Skip to content
Snippets Groups Projects
Commit 21992ed1 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Reverse out nextval patch.

parent ac00256c
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.61 1999/12/16 20:07:41 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.62 1999/12/17 01:25:25 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -531,30 +531,6 @@ static Node * ...@@ -531,30 +531,6 @@ static Node *
transformAttr(ParseState *pstate, Attr *att, int precedence) transformAttr(ParseState *pstate, Attr *att, int precedence)
{ {
Node *basenode; Node *basenode;
char * attribute;
/* Get the name of the first attribute */
if ((att != NULL) && (lfirst(att->attrs) != NULL))
{
/*
* Special case for name.nextval and name.currval, assume it's a
* sequence and transform to function call to nextval('name') and
* currval('name')
*/
attribute = pstrdup(((Value *) lfirst(att->attrs))->val.str);
if ((strcasecmp(attribute, "nextval") == 0) ||
(strcasecmp(attribute, "currval") == 0))
{
Value *s = makeNode(Value);
s->type = T_String;
s->val.str = att->relname;
return ParseFuncOrColumn(pstate, attribute,
lcons(make_const(s), NIL), false, false,
&pstate->p_last_resno, precedence);
}
}
basenode = ParseNestedFuncOrColumn(pstate, att, &pstate->p_last_resno, basenode = ParseNestedFuncOrColumn(pstate, att, &pstate->p_last_resno,
precedence); precedence);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment