From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Last call for comments: fmgr rewrite [LONG] |
Date: | 2000-05-22 21:58:21 |
Message-ID: | Pine.LNX.4.21.0005222337400.392-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I just got my hands on the real SQL99 stuff, dated September 1999, and it
contains a function creation syntax that is strikingly similar to ours,
which would make it a shame not to at least try to play along. Below is a
heavily reduced BNF which should give you some idea -- note in particular
the NULL call conventions. Download your copy at
<ftp://jerry.ece.umassd.edu/isowg3/x3h2/Standards/>.
<schema function> ::=
CREATE FUNCTION <schema qualified name>
<SQL parameter declaration list>
RETURNS <data type>
[ <routine characteristics>... ]
[ <dispatch clause> ]
<routine body>
<dispatch clause> ::= STATIC DISPATCH /* no idea */
<SQL parameter declaration list> ::=
<left paren>
[ <SQL parameter declaration> [ { <comma> <SQL parameter declaration> }... ] ]
<right paren>
<SQL parameter declaration> ::=
[ <parameter mode> ] [ <SQL parameter name> ]
<parameter type>
[ RESULT ]
<parameter mode> ::= IN | OUT | INOUT
/* default is IN */
<routine body> ::=
<SQL routine body>
| <external body reference>
<SQL routine body> ::= <SQL procedure statement>
/* which means a particular subset of SQL statements */
<external body reference> ::=
EXTERNAL [ NAME <external routine name> ]
[ <parameter style clause> ]
[ <external security clause> ]
<routine characteristic> ::=
LANGUAGE { ADA | C | COBOL | FORTRAN | MUMPS | PASCAL | PLI | SQL }
| PARAMETER STYLE { SQL | GENERAL }
| SPECIFIC <specific name> /* apparently to disambiguate overloaded functions */
| { DETERMINISTIC | NOT DETERMINISTIC }
| { NO SQL | CONTAINS SQL | READS SQL DATA | MODIFIES SQL DATA }
| { RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| <transform group specification>
| <dynamic result sets characteristic>
--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-05-22 21:58:33 | Re: [PORTS] Logging (was Re: PostgreSQL 7.0-2 RPMset released.) |
Previous Message | Murad Nayal | 2000-05-22 21:28:16 | Re: port v7.0 to SGI-IRIX-6.5.7/64 |