1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +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:
Robert Haas
2010-08-05 15:25:36 +00:00
parent 2a6ef3445c
commit fd1843ff89
22 changed files with 401 additions and 504 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/wparser.c,v 1.12 2010/01/02 16:57:53 momjian Exp $
* $PostgreSQL: pgsql/src/backend/tsearch/wparser.c,v 1.13 2010/08/05 15:25:35 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@ -134,7 +134,7 @@ ts_token_type_byname(PG_FUNCTION_ARGS)
Oid prsId;
funcctx = SRF_FIRSTCALL_INIT();
prsId = TSParserGetPrsid(textToQualifiedNameList(prsname), false);
prsId = get_ts_parser_oid(textToQualifiedNameList(prsname), false);
tt_setup_firstcall(funcctx, prsId);
}
@ -282,7 +282,7 @@ ts_parse_byname(PG_FUNCTION_ARGS)
Oid prsId;
funcctx = SRF_FIRSTCALL_INIT();
prsId = TSParserGetPrsid(textToQualifiedNameList(prsname), false);
prsId = get_ts_parser_oid(textToQualifiedNameList(prsname), false);
prs_setup_firstcall(funcctx, prsId, txt);
}