Re: PL/PgSQL "bare" function calls

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: PL/PgSQL "bare" function calls
Дата
Msg-id 1095387924.1141.16.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: PL/PgSQL "bare" function calls  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PL/PgSQL "bare" function calls  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2004-09-17 at 00:34, Tom Lane wrote:
> I think Andrew has a point: why aren't they the same issue?  It would
> certainly be no harder to support
>     func( ... );
> as a SQL statement than as something allowed only in plpgsql.

If there's a consensus that it is better to modify the main grammar so
that unadorned function calls are legal anywhere, that's fine with me.
If anyone doesn't want this, speak up now.

(Note that we need to support CALL proc(...); in SQL for standards
compliance in any event.)

> I think it'd be easier to make it work in the full bison grammar
> than with some lookahead hack in plpgsql.

Well, as it turns out, it's easy to do in PL/PgSQL as well. The SELECT
issue you mentioned doesn't actually pose a problem, because
   SELECT (2, 3, 4);

is _not_ legal SQL in PL/PgSQL (PL/PgSQL requires SELECT INTO). Also, we
get support for double-quotes and schema-qualified function names for
free, because of how the PL/PgSQL scanner works.

-Neil




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Others applying patch queue patches
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Others applying patch queue patches