Re: Last call for comments: fmgr rewrite [LONG] - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Last call for comments: fmgr rewrite [LONG]
Date
Msg-id Pine.LNX.4.21.0005222337400.392-100000@localhost.localdomain
Whole thread Raw
In response to Last call for comments: fmgr rewrite [LONG]  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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
declarationlist>               RETURNS <data type>               [ <routine characteristics>... ]               [
<dispatchclause> ]               <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> ]
<parametertype>               [ 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
overloadedfunctions */             | { DETERMINISTIC | NOT DETERMINISTIC }             | { NO SQL | CONTAINS SQL |
READSSQL DATA | MODIFIES SQL DATA }             | { RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            | <transform group specification>             | <dynamic
resultsets characteristic>
 


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: OO Patch
Next
From: Peter Eisentraut
Date:
Subject: Re: [PORTS] Logging (was Re: [GENERAL] PostgreSQL 7.0-2 RPMset released.)