mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
New NameStr macro to convert Name to Str. No need for var.data anymore.
Fewer calls to nameout. Better use of RelationGetRelationName.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.47 1999/11/01 05:06:21 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.48 1999/11/07 23:08:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -197,7 +197,7 @@ updateTargetListEntry(ParseState *pstate,
|
||||
Node *arrayBase;
|
||||
ArrayRef *aref;
|
||||
|
||||
att->relname = pstrdup(RelationGetRelationName(rd)->data);
|
||||
att->relname = pstrdup(RelationGetRelationName(rd));
|
||||
att->attrs = lcons(makeString(colname), NIL);
|
||||
arrayBase = ParseNestedFuncOrColumn(pstate, att,
|
||||
&pstate->p_last_resno,
|
||||
@ -381,7 +381,7 @@ checkInsertTargets(ParseState *pstate, List *cols, List **attrnos)
|
||||
Ident *id = makeNode(Ident);
|
||||
|
||||
id->name = palloc(NAMEDATALEN);
|
||||
StrNCpy(id->name, attr[i]->attname.data, NAMEDATALEN);
|
||||
StrNCpy(id->name, NameStr(attr[i]->attname), NAMEDATALEN);
|
||||
id->indirection = NIL;
|
||||
id->isRel = false;
|
||||
cols = lappend(cols, id);
|
||||
|
Reference in New Issue
Block a user