used. From Jaime Casanova.
Relation rel;
Oid relid;
- relvar = makeRangeVarFromNameList(textToQualifiedNameList(relname_text, "get_relid_from_relname"));
+ relvar = makeRangeVarFromNameList(textToQualifiedNameList(relname_text));
rel = heap_openrv(relvar, AccessShareLock);
relid = RelationGetRelid(rel);
relation_close(rel, AccessShareLock);
* Copyright (c) 2002-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/contrib/dbsize/dbsize.c,v 1.16 2005/01/01 05:43:05 momjian Exp $
+ * $PostgreSQL: pgsql/contrib/dbsize/dbsize.c,v 1.17 2005/05/27 00:57:48 neilc Exp $
*
*/
Oid relnodeOid;
Oid tblspcOid;
- relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname,
- "relation_size"));
+ relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname));
relation = relation_openrv(relrv, AccessShareLock);
tblspcOid = relation->rd_rel->reltablespace;
/*
- * $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.17 2004/10/15 22:39:38 tgl Exp $
+ * $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.18 2005/05/27 00:57:49 neilc Exp $
*
* Copyright (c) 2001,2002 Tatsuo Ishii
*
Datum result;
/* open relation */
- relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname,
- "pgstattuple"));
+ relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname));
rel = heap_openrv(relrv, AccessShareLock);
result = pgstattuple_real(rel);
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.22 2005/04/14 20:03:23 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.23 2005/05/27 00:57:49 neilc Exp $
*
*-------------------------------------------------------------------------
*/
*(str + len) = '\0';
/* Look up the conversion name */
- parsed_name = textToQualifiedNameList(conv_name, "convert_using");
+ parsed_name = textToQualifiedNameList(conv_name);
convoid = FindConversionByName(parsed_name);
if (!OidIsValid(convoid))
ereport(ERROR,
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.119 2004/12/31 21:59:41 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.120 2005/05/27 00:57:49 neilc Exp $
*
*-------------------------------------------------------------------------
*/
rescnt = 0;
bool logit = false;
- sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin,
- "nextval"));
+ sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin));
/* open and AccessShareLock sequence */
init_sequence(sequence, &elm, &seqrel);
Relation seqrel;
int64 result;
- sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin,
- "currval"));
+ sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin));
/* open and AccessShareLock sequence */
init_sequence(sequence, &elm, &seqrel);
int64 next = PG_GETARG_INT64(1);
RangeVar *sequence;
- sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin,
- "setval"));
+ sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin));
do_setval(sequence, next, true);
bool iscalled = PG_GETARG_BOOL(2);
RangeVar *sequence;
- sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin,
- "setval"));
+ sequence = makeRangeVarFromNameList(textToQualifiedNameList(seqin));
do_setval(sequence, next, iscalled);
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.113 2004/12/31 22:01:21 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.114 2005/05/27 00:57:49 neilc Exp $
*
*-------------------------------------------------------------------------
*/
{
RangeVar *relrv;
- relrv = makeRangeVarFromNameList(textToQualifiedNameList(tablename,
- "has_table_privilege"));
+ relrv = makeRangeVarFromNameList(textToQualifiedNameList(tablename));
return RangeVarGetRelid(relrv, false);
}
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/not_in.c,v 1.42 2004/12/31 22:01:22 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/not_in.c,v 1.43 2005/05/27 00:57:49 neilc Exp $
*
*-------------------------------------------------------------------------
*/
/* Parse the argument */
- names = textToQualifiedNameList(relation_and_attr, "int4notin");
+ names = textToQualifiedNameList(relation_and_attr);
nnames = list_length(names);
if (nnames < 2)
ereport(ERROR,
* back to source text
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.195 2005/05/01 18:56:18 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.196 2005/05/27 00:57:49 neilc Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
RangeVar *viewrel;
Oid viewoid;
- viewrel = makeRangeVarFromNameList(textToQualifiedNameList(viewname,
- "get_viewdef"));
+ viewrel = makeRangeVarFromNameList(textToQualifiedNameList(viewname));
viewoid = RangeVarGetRelid(viewrel, false);
PG_RETURN_TEXT_P(string_to_text(pg_get_viewdef_worker(viewoid, 0)));
Oid viewoid;
prettyFlags = pretty ? PRETTYFLAG_PAREN | PRETTYFLAG_INDENT : 0;
- viewrel = makeRangeVarFromNameList(textToQualifiedNameList(viewname,
- "get_viewdef"));
+ viewrel = makeRangeVarFromNameList(textToQualifiedNameList(viewname));
viewoid = RangeVarGetRelid(viewrel, false);
PG_RETURN_TEXT_P(string_to_text(pg_get_viewdef_worker(viewoid, prettyFlags)));
HeapTuple tup;
/* Get the OID of the table */
- tablerv = makeRangeVarFromNameList(textToQualifiedNameList(tablename,
- "pg_get_serial_sequence"));
+ tablerv = makeRangeVarFromNameList(textToQualifiedNameList(tablename));
tableOid = RangeVarGetRelid(tablerv, false);
/* Get the number of the column */
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/tid.c,v 1.48 2004/12/31 22:01:22 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/tid.c,v 1.49 2005/05/27 00:57:49 neilc Exp $
*
* NOTES
* input routine largely stolen from boxin().
RangeVar *relrv;
Relation rel;
- relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname,
- "currtid_byrelname"));
+ relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname));
rel = heap_openrv(relrv, AccessShareLock);
if (rel->rd_rel->relkind == RELKIND_VIEW)
return currtid_for_view(rel, tid);
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.121 2005/05/20 01:29:55 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.122 2005/05/27 00:57:49 neilc Exp $
*
*-------------------------------------------------------------------------
*/
* truncate names if they're too long.
*/
List *
-textToQualifiedNameList(text *textval, const char *caller)
+textToQualifiedNameList(text *textval)
{
char *rawname;
List *result = NIL;
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.256 2005/05/20 01:29:55 neilc Exp $
+ * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.257 2005/05/27 00:57:49 neilc Exp $
*
*-------------------------------------------------------------------------
*/
extern Datum name_text(PG_FUNCTION_ARGS);
extern Datum text_name(PG_FUNCTION_ARGS);
extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2);
-extern List *textToQualifiedNameList(text *textval, const char *caller);
+extern List *textToQualifiedNameList(text *textval);
extern bool SplitIdentifierString(char *rawstring, char separator,
List **namelist);
extern Datum replace_text(PG_FUNCTION_ARGS);