mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Standardize get_whatever_oid functions for other object types.
- Rename TSParserGetPrsid to get_ts_parser_oid. - Rename TSDictionaryGetDictid to get_ts_dict_oid. - Rename TSTemplateGetTmplid to get_ts_template_oid. - Rename TSConfigGetCfgid to get_ts_config_oid. - Rename FindConversionByName to get_conversion_oid. - Rename GetConstraintName to get_constraint_oid. - Add new functions get_opclass_oid, get_opfamily_oid, get_rewrite_oid, get_rewrite_oid_without_relid, get_trigger_oid, and get_cast_oid. The name of each function matches the corresponding catalog. Thanks to KaiGai Kohei for the review.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.103 2010/08/05 14:45:07 rhaas Exp $
|
||||
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.104 2010/08/05 15:25:36 rhaas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -67,6 +67,7 @@ extern void DropCastById(Oid castOid);
|
||||
extern void AlterFunctionNamespace(List *name, List *argtypes, bool isagg,
|
||||
const char *newschema);
|
||||
extern void ExecuteDoStmt(DoStmt *stmt);
|
||||
extern Oid get_cast_oid(Oid sourcetypeid, Oid targettypeid, bool missing_ok);
|
||||
|
||||
/* commands/operatorcmds.c */
|
||||
extern void DefineOperator(List *names, List *parameters);
|
||||
@@ -75,6 +76,8 @@ extern void RemoveOperatorById(Oid operOid);
|
||||
extern void AlterOperatorOwner(List *name, TypeName *typeName1,
|
||||
TypeName *typename2, Oid newOwnerId);
|
||||
extern void AlterOperatorOwner_oid(Oid operOid, Oid newOwnerId);
|
||||
extern Oid get_opclass_oid(Oid amID, List *opclassname, bool missing_ok);
|
||||
extern Oid get_opfamily_oid(Oid amID, List *opfamilyname, bool missing_ok);
|
||||
|
||||
/* commands/aggregatecmds.c */
|
||||
extern void DefineAggregate(List *name, List *args, bool oldstyle,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.80 2010/01/17 22:56:23 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.81 2010/08/05 15:25:36 rhaas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -111,6 +111,7 @@ extern Oid CreateTrigger(CreateTrigStmt *stmt, const char *queryString,
|
||||
extern void DropTrigger(Oid relid, const char *trigname,
|
||||
DropBehavior behavior, bool missing_ok);
|
||||
extern void RemoveTriggerById(Oid trigOid);
|
||||
extern Oid get_trigger_oid(Oid relid, const char *name, bool missing_ok);
|
||||
|
||||
extern void renametrig(Oid relid, const char *oldname, const char *newname);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user