From fd1843ff8979c0461fb3f1a9eab61140c977e32d Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 5 Aug 2010 15:25:36 +0000 Subject: 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. --- src/backend/parser/parse_utilcmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/parser/parse_utilcmd.c') diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index a7e875b380c..b4e0a614c41 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -19,7 +19,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.41 2010/07/28 05:22:24 sriggs Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.42 2010/08/05 15:25:35 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -713,8 +713,8 @@ transformInhRelation(ParseState *pstate, CreateStmtContext *cxt, /* Copy comment on constraint */ if ((inhRelation->options & CREATE_TABLE_LIKE_COMMENTS) && - (comment = GetComment(GetConstraintByName(RelationGetRelid(relation), - n->conname), + (comment = GetComment(get_constraint_oid(RelationGetRelid(relation), + n->conname, false), ConstraintRelationId, 0)) != NULL) { -- cgit v1.2.3