#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.37 1996/10/11 02:38:16 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.38 1996/10/13 04:25:23 momjian Exp $
#
# NOTES
# This is seen by any Makefiles that include mk/postgres.mk. To
X11_LIBDIR = /usr/lib
X11_LIB = -lX11 -lsocket -lnsl
-#
+# These must match include/config.h
+NAMEDATALEN= 32
+OIDNAMELEN= 36
+
# include port specific rules and variables. For instance:
#
# signal(2) handling - this is here because it affects some of
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.5 1996/08/06 16:37:58 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.6 1996/10/13 04:25:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
pstate = malloc(sizeof(ParseState));
pstate->p_last_resno = 1;
pstate->p_target_resnos = NIL;
+ pstate->p_current_rel = NULL;
pstate->p_rtable = NIL;
pstate->p_query_is_rule = 0;
pstate->p_numAgg = 0;
- pstate->p_aggs = NULL;
+ pstate->p_aggs = NIL;
return (pstate);
}
pstate = makeParseState();
result->qtrees[i++] = transformStmt(pstate, lfirst(pl));
pl = lnext(pl);
+ if (pstate->p_current_rel != NULL)
+ heap_close(pstate->p_current_rel);
free(pstate);
}
pstate->p_rtable = lappend(pstate->p_rtable, ent);
}
x = RangeTablePosn(pstate->p_rtable, relname);
- pstate->parser_current_rel = heap_openr(VarnoGetRelname(pstate,x));
- if (pstate->parser_current_rel == NULL)
+ pstate->p_current_rel = heap_openr(VarnoGetRelname(pstate,x));
+ if (pstate->p_current_rel == NULL)
elog(WARN,"invalid relation name");
}
exprs = lnext(exprs);
}
} else {
- Relation insertRel = pstate->parser_current_rel;
+ Relation insertRel = pstate->p_current_rel;
int numcol;
int i;
AttributeTupleForm *attr = insertRel->rd_att->attrs;
i++;
}
sprintf(str, "=%s", val);
- rd = pstate->parser_current_rel;
+ rd = pstate->p_current_rel;
Assert(rd != NULL);
resdomno = varattno(rd, res->name);
ndims = att_attnelems(rd, resdomno);
* append, replace work only on one relation,
* so multiple occurence of same resdomno is bogus
*/
- rd = pstate->parser_current_rel;
+ rd = pstate->p_current_rel;
Assert(rd != NULL);
resdomno = varattno(rd,name);
attrisset = varisset(rd,name);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_state.h,v 1.1 1996/08/28 07:23:56 scrappy Exp $
+ * $Id: parse_state.h,v 1.2 1996/10/13 04:26:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
typedef struct ParseState {
int p_last_resno;
List *p_target_resnos;
- Relation parser_current_rel;
+ Relation p_parser_current_rel;
List *p_rtable;
int p_query_is_rule;
int p_numAgg;