From ee8ed85da3b0548eba96f2ec68fa7ba577bba586 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 13 Aug 2001 21:34:54 +0000 Subject: Make LANCOMPILER clause in CREATE LANGUAGE optional. Allow "identifier" syntax for language names (instead of 'string'). createlang now handles the case where a second language uses the same call handler as an already installed language (e.g., plperl/plperlu). droplang now handles the reverse case, i.e., dropping a language where the call handler is still used by another language. Moreover, droplang can now be used to drop any user-defined language, not just the supplied ones. --- doc/src/sgml/ref/create_function.sgml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'doc/src/sgml/ref/create_function.sgml') diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml index 2a28925dff5..aa6552dca7d 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -1,5 +1,5 @@ @@ -18,12 +18,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.24 2001/06/04 CREATE FUNCTION name ( [ argtype [, ...] ] ) RETURNS rettype AS 'definition' - LANGUAGE 'langname' + LANGUAGE langname [ WITH ( attribute [, ...] ) ] CREATE FUNCTION name ( [ argtype [, ...] ] ) RETURNS rettype AS 'obj_file', 'link_symbol' - LANGUAGE 'langname' + LANGUAGE langname [ WITH ( attribute [, ...] ) ] @@ -123,13 +123,14 @@ CREATE FUNCTION name ( [ - May be 'sql', 'C', - 'internal', or 'plname', where 'plname' is the name of a + May be SQL, C, + internal, or plname, where plname is the name of a created procedural language. See - for details. + for details. For backward compatibility, the name may be + enclosed by single quotes. @@ -261,7 +262,7 @@ CREATE FUNCTION name ( [ CREATE FUNCTION one() RETURNS integer AS 'SELECT 1 AS RESULT;' - LANGUAGE 'sql'; + LANGUAGE SQL; SELECT one() AS answer; @@ -281,7 +282,7 @@ SELECT one() AS answer; CREATE FUNCTION ean_checkdigit(char, char) RETURNS boolean - AS '/usr1/proj/bray/sql/funcs.so' LANGUAGE 'c'; + AS '/usr1/proj/bray/sql/funcs.so' LANGUAGE C; CREATE TABLE product ( id char(8) PRIMARY KEY, @@ -306,7 +307,7 @@ CREATE TABLE product ( CREATE FUNCTION point(complex) RETURNS point AS '/home/bernie/pgsql/lib/complex.so', 'complex_to_point' - LANGUAGE 'c'; + LANGUAGE C; The C declaration of the function could be: -- cgit v1.2.3