1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

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.
This commit is contained in:
Robert Haas
2012-12-23 18:25:03 -05:00
parent 31bc839724
commit c504513f83
39 changed files with 385 additions and 276 deletions

View File

@ -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;
}