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