1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +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

@ -34,7 +34,7 @@
/*
* CREATE CONVERSION
*/
void
Oid
CreateConversionCommand(CreateConversionStmt *stmt)
{
Oid namespaceId;
@ -111,14 +111,14 @@ CreateConversionCommand(CreateConversionStmt *stmt)
* All seem ok, go ahead (possible failure would be a duplicate conversion
* name)
*/
ConversionCreate(conversion_name, namespaceId, GetUserId(),
from_encoding, to_encoding, funcoid, stmt->def);
return ConversionCreate(conversion_name, namespaceId, GetUserId(),
from_encoding, to_encoding, funcoid, stmt->def);
}
/*
* Rename conversion
*/
void
Oid
RenameConversion(List *name, const char *newname)
{
Oid conversionOid;
@ -164,4 +164,6 @@ RenameConversion(List *name, const char *newname)
heap_close(rel, NoLock);
heap_freetuple(tup);
return conversionOid;
}