diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-07-16 01:30:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-07-16 01:30:23 +0000 |
commit | d89737d31c03d90a2b0412e63953493576a2a3d7 (patch) | |
tree | 0afc63e59fae7ec3c53339641a6f65e6a04733d2 /src/backend/parser/parse_utilcmd.c | |
parent | 2c773296f88fe800315ca1bf131287662ecef999 (diff) | |
download | postgresql-d89737d31c03d90a2b0412e63953493576a2a3d7.tar.gz postgresql-d89737d31c03d90a2b0412e63953493576a2a3d7.zip |
Support "variadic" functions, which can accept a variable number of arguments
so long as all the trailing arguments are of the same (non-array) type.
The function receives them as a single array argument (which is why they
have to all be the same type).
It might be useful to extend this facility to aggregates, but this patch
doesn't do that.
This patch imposes a noticeable slowdown on function lookup --- a follow-on
patch will fix that by adding a redundant column to pg_proc.
Pavel Stehule
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 33f5b8015f6..bbdea4642cc 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -19,7 +19,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.13 2008/04/29 14:59:17 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.14 2008/07/16 01:30:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -388,6 +388,7 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt, funccallnode->args = list_make1(castnode); funccallnode->agg_star = false; funccallnode->agg_distinct = false; + funccallnode->func_variadic = false; funccallnode->location = -1; constraint = makeNode(Constraint); |