Search Postgresql Archives

Re: Can the string literal syntax for function definitions please be dropped ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 25 Oct 2009 20:17:22 -0400, Tom Lane wrote about Re: 
Can the string literal syntax for function definitions please be
dropped ?:

[snip]
>         <routine body> ::=
>                <SQL routine body>
>              | <external body reference>
>
>         <SQL routine body> ::= <SQL procedure statement>
>
>and <SQL procedure statement> seems to allow one (count em, one) SQL
>DDL or DML statement.  So per spec, essentially every interesting case
>requires an <external body reference>.

This explains the evolution of DB2's support for user-defined
functions: initially they (UDFs) had to be written in some host language
(COBOL, PL/I, C, etc.), and linked in by external reference; later, a
single SQL statement(*) was permitted instead; finally, a compound SQL
statement was permitted, with BEGIN and END bracketing an arbitrary
collection of other SQL statements.

(*) Since all UDFs must return a value, the single statement was
almost invariably a RETURN with some query providing the value.
-- 
Regards,

Dave  [RLU #314465]
=======================================================================
david.w.noon@xxxxxxxxxxxx (David W Noon)
=======================================================================

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux