Re: PL/PgSQL "bare" function calls
| От | Tom Lane |
|---|---|
| Тема | Re: PL/PgSQL "bare" function calls |
| Дата | |
| Msg-id | 3833.1095260748@sss.pgh.pa.us обсуждение |
| Ответ на | PL/PgSQL "bare" function calls (Neil Conway <neilc@samurai.com>) |
| Ответы |
Re: PL/PgSQL "bare" function calls
Re: PL/PgSQL "bare" function calls |
| Список | pgsql-hackers |
Neil Conway <neilc@samurai.com> writes:
> (3) The parser must distinguish between two cases when it sees an
> unknown word (T_WORD) beginning a statement. The word could be the
> beginning of a SQL statement (stmt_execsql in the grammar), such as:
> UPDATE ...;
> or the name of a function in a function call:
> invoke_func(...);
> The patch currently distinguishes between these cases by looking at the
> next token -- if it is a left parenthesis, the patch assumes it is a
> function call, otherwise it assumes it is a SQL statement. Is this the
> best approach?
That seems fairly unworkable. For example
SELECT (2,3,4);
is valid SQL. Also I'm not sure if you can extend this to cope with
schema-qualified function names.
regards, tom lane
В списке pgsql-hackers по дате отправления: