From c504513f83a9ee8dce4a719746ca73102cae9f13 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Sun, 23 Dec 2012 18:25:03 -0500 Subject: 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. --- src/backend/commands/aggregatecmds.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/backend/commands/aggregatecmds.c') 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; } -- cgit v1.2.3