diff options
author | Robert Haas <rhaas@postgresql.org> | 2012-12-23 18:25:03 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2012-12-23 18:37:58 -0500 |
commit | c504513f83a9ee8dce4a719746ca73102cae9f13 (patch) | |
tree | 3664999ca3242003181bef1fa171e28fe557ecb9 /src/backend/commands/aggregatecmds.c | |
parent | 31bc839724439440b2e94ea616b28ce5be94e19c (diff) | |
download | postgresql-c504513f83a9ee8dce4a719746ca73102cae9f13.tar.gz postgresql-c504513f83a9ee8dce4a719746ca73102cae9f13.zip |
Adjust many backend functions to return OID rather than void.
Extracted from a larger patch by Dimitri Fontaine. It is hoped that
this will provide infrastructure for enriching the new event trigger
functionality, but it seems possibly useful for other purposes as
well.
Diffstat (limited to 'src/backend/commands/aggregatecmds.c')
-rw-r--r-- | src/backend/commands/aggregatecmds.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c index b9f871182fa..67a29d19fc1 100644 --- a/src/backend/commands/aggregatecmds.c +++ b/src/backend/commands/aggregatecmds.c @@ -46,7 +46,7 @@ * is specified by a BASETYPE element in the parameters. Otherwise, * "args" defines the input type(s). */ -void +Oid DefineAggregate(List *name, List *args, bool oldstyle, List *parameters) { char *aggName; @@ -216,15 +216,15 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters) /* * Most of the argument-checking is done inside of AggregateCreate */ - AggregateCreate(aggName, /* aggregate name */ - aggNamespace, /* namespace */ - aggArgTypes, /* input data type(s) */ - numArgs, - transfuncName, /* step function name */ - finalfuncName, /* final function name */ - sortoperatorName, /* sort operator name */ - transTypeId, /* transition data type */ - initval); /* initial condition */ + return AggregateCreate(aggName, /* aggregate name */ + aggNamespace, /* namespace */ + aggArgTypes, /* input data type(s) */ + numArgs, + transfuncName, /* step function name */ + finalfuncName, /* final function name */ + sortoperatorName, /* sort operator name */ + transTypeId, /* transition data type */ + initval); /* initial condition */ } @@ -232,7 +232,7 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters) * RenameAggregate * Rename an aggregate. */ -void +Oid RenameAggregate(List *name, List *args, const char *newname) { Oid procOid; @@ -286,4 +286,6 @@ RenameAggregate(List *name, List *args, const char *newname) heap_close(rel, NoLock); heap_freetuple(tup); + + return procOid; } |