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

Поиск
Список
Период
Сортировка
От David W Noon
Тема Re: Can the string literal syntax for function definitions please be dropped ?
Дата
Msg-id 20091026004339.687b567f@dwnoon.ntlworld.com
обсуждение исходный текст
Ответ на Re: Can the string literal syntax for function definitions please be dropped ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sun, 25 Oct 2009 20:17:22 -0400, Tom Lane wrote about Re: [GENERAL]
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@ntlworld.com (David W Noon)
=======================================================================

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Can the string literal syntax for function definitions please be dropped ?
Следующее
От: ginanjar
Дата:
Сообщение: indexing