<programlisting>
CREATE TYPE hstore ...;
-CREATE LANGUAGE plpythonu ...;
+CREATE EXTENSION plpythonu;
</programlisting>
Then create the necessary functions:
<programlisting>
TO SQL WITH FUNCTION plpython_to_hstore(internal)
);
</programlisting>
- In practice, these commands would be wrapped up in extensions.
+ In practice, these commands would be wrapped up in an extension.
</para>
<para>
<para>
The procedural language to be used must already have been installed
- into the current database by means of <command>CREATE LANGUAGE</command>.
+ into the current database by means of <command>CREATE EXTENSION</command>.
<literal>plpgsql</literal> is installed by default, but other languages are not.
</para>
(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);