CREATE TYPE hstore ...;
-CREATE LANGUAGE plpythonu ...;
+CREATE EXTENSION plpythonu;
Then create the necessary functions:
TO SQL WITH FUNCTION plpython_to_hstore(internal)
);
- In practice, these commands would be wrapped up in extensions.
+ In practice, these commands would be wrapped up in an extension.
The procedural language to be used must already have been installed
- into the current database by means of CREATE LANGUAGE.
+ into the current database by means of CREATE EXTENSION.
plpgsql is installed by default, but other languages are not.
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("language \"%s\" does not exist", language),
(PLTemplateExists(language) ?
- errhint("Use CREATE LANGUAGE to load the language into the database.") : 0)));
+ errhint("Use CREATE EXTENSION to load the language into the database.") : 0)));
languageOid = HeapTupleGetOid(languageTuple);
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("language \"%s\" does not exist", language),
(PLTemplateExists(language) ?
- errhint("Use CREATE LANGUAGE to load the language into the database.") : 0)));
+ errhint("Use CREATE EXTENSION to load the language into the database.") : 0)));
codeblock->langOid = HeapTupleGetOid(languageTuple);
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);