compatiblity with old rules.
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: view.c,v 1.42 2000/02/15 03:36:39 thomas Exp $
+ * $Id: view.c,v 1.43 2000/06/12 19:40:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* This update consists of adding two new entries IN THE BEGINNING
* of the range table (otherwise the rule system will die a slow,
* horrible and painful death, and we do not want that now, do we?)
- * one for the CURRENT relation and one for the NEW one (both of
+ * one for the OLD relation and one for the NEW one (both of
* them refer in fact to the "view" relation).
*
* Of course we must also increase the 'varnos' of all the Var nodes
/*
* create the 2 new range table entries and form the new range
- * table... CURRENT first, then NEW....
+ * table... OLD first, then NEW....
*/
rt_entry1 = addRangeTableEntry(NULL, (char *) viewName,
- makeAttr("*CURRENT*", NULL),
+ makeAttr("*OLD*", NULL),
FALSE, FALSE, FALSE);
rt_entry2 = addRangeTableEntry(NULL, (char *) viewName,
makeAttr("*NEW*", NULL),
/*
* The range table of 'viewParse' does not contain entries for the
- * "CURRENT" and "NEW" relations. So... add them! NOTE: we make the
+ * "OLD" and "NEW" relations. So... add them! NOTE: we make the
* update in place! After this call 'viewParse' will never be what it
* used to be...
*/
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: analyze.c,v 1.146 2000/06/09 01:44:18 momjian Exp $
+ * $Id: analyze.c,v 1.147 2000/06/12 19:40:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
nothing_qry->commandType = CMD_NOTHING;
addRangeTableEntry(pstate, stmt->object->relname,
- makeAttr("*CURRENT*", NULL),
+ makeAttr("*OLD*", NULL),
FALSE, FALSE, FALSE);
addRangeTableEntry(pstate, stmt->object->relname,
makeAttr("*NEW*", NULL),
{
/*
- * NOTE: 'CURRENT' must always have a varno equal to 1 and 'NEW'
+ * NOTE: 'OLD' must always have a varno equal to 1 and 'NEW'
* equal to 2.
*/
addRangeTableEntry(pstate, stmt->object->relname,
- makeAttr("*CURRENT*", NULL),
+ makeAttr("*OLD*", NULL),
FALSE, FALSE, FALSE);
addRangeTableEntry(pstate, stmt->object->relname,
makeAttr("*NEW*", NULL),
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.172 2000/06/12 03:40:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.173 2000/06/12 19:40:40 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
BEGIN_TRANS, BETWEEN, BOTH, BY,
CASCADE, CASE, CAST, CHAR, CHARACTER, CHECK, CLOSE,
COALESCE, COLLATE, COLUMN, COMMIT,
- CONSTRAINT, CONSTRAINTS, CREATE, CROSS, CURRENT, CURRENT_DATE,
+ CONSTRAINT, CONSTRAINTS, CREATE, CROSS, CURRENT_DATE,
CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURSOR,
DAY_P, DEC, DECIMAL, DECLARE, DEFAULT, DELETE, DESC,
DISTINCT, DOUBLE, DROP,
ISOLATION, JOIN, KEY, LANGUAGE, LEADING, LEFT, LEVEL, LIKE, LOCAL,
MATCH, MINUTE_P, MONTH_P, NAMES,
NATIONAL, NATURAL, NCHAR, NEXT, NO, NOT, NULLIF, NULL_P, NUMERIC,
- OF, ON, ONLY, OPTION, OR, ORDER, OUTER_P, OVERLAPS,
+ OF, OLD, ON, ONLY, OPTION, OR, ORDER, OUTER_P, OVERLAPS,
PARTIAL, POSITION, PRECISION, PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PUBLIC,
READ, REFERENCES, RELATIVE, REVOKE, RIGHT, ROLLBACK,
SCROLL, SECOND_P, SELECT, SESSION_USER, SET, SOME, SUBSTRING,
| CONSTRAINT { $$ = "constraint"; }
| COPY { $$ = "copy"; }
| CROSS { $$ = "cross"; }
- | CURRENT { $$ = "current"; }
| CURRENT_DATE { $$ = "current_date"; }
| CURRENT_TIME { $$ = "current_time"; }
| CURRENT_TIMESTAMP { $$ = "current_timestamp"; }
| NUMERIC { $$ = "numeric"; }
| OFF { $$ = "off"; }
| OFFSET { $$ = "offset"; }
+ | OLD { $$ = "old"; }
| ON { $$ = "on"; }
| ONLY { $$ = "only"; }
| OR { $$ = "or"; }
| WHERE { $$ = "where"; }
;
-SpecialRuleRelation: CURRENT
+SpecialRuleRelation: OLD
{
if (QueryIsRule)
- $$ = "*CURRENT*";
+ $$ = "*OLD*";
else
- elog(ERROR,"CURRENT used in non-rule query");
+ elog(ERROR,"OLD used in non-rule query");
}
| NEW
{
*
* IDENTIFICATION
<<<<<<< keywords.c
- * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.76 2000/06/12 03:40:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.77 2000/06/12 19:40:41 momjian Exp $
=======
- * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.76 2000/06/12 03:40:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.77 2000/06/12 19:40:41 momjian Exp $
>>>>>>> 1.73
*
*-------------------------------------------------------------------------
{"createdb", CREATEDB},
{"createuser", CREATEUSER},
{"cross", CROSS},
+ /* for portability with old rules bjm 2000-06-12 */
+ {"current", OLD},
{"current_date", CURRENT_DATE},
{"current_time", CURRENT_TIME},
{"current_timestamp", CURRENT_TIMESTAMP},
{"off", OFF},
{"offset", OFFSET},
{"oids", OIDS},
- {"old", CURRENT},
+ {"old", OLD},
{"on", ON},
{"only", ONLY},
{"operator", OPERATOR},
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.42 2000/06/08 22:37:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.43 2000/06/12 19:40:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (rt_index != 0 && (!inFromCl || sublevels_up == 0))
{
- if (!strcmp(ref->relname, "*CURRENT*") || !strcmp(ref->relname, "*NEW*"))
+ if (!strcmp(ref->relname, "*OLD*") || !strcmp(ref->relname, "*NEW*"))
return (RangeTblEntry *) nth(rt_index - 1, pstate->p_rtable);
elog(ERROR, "Table name '%s' specified more than once", ref->relname);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.74 2000/05/30 00:49:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.75 2000/06/12 19:40:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
OffsetVarNodes((Node *) info->rule_action->targetList, rt_length, 0);
OffsetVarNodes(info->rule_qual, rt_length, 0);
ChangeVarNodes((Node *) info->rule_action->qual,
- PRS2_CURRENT_VARNO + rt_length, rt_index, 0);
+ PRS2_OLD_VARNO + rt_length, rt_index, 0);
ChangeVarNodes((Node *) info->rule_action->targetList,
- PRS2_CURRENT_VARNO + rt_length, rt_index, 0);
+ PRS2_OLD_VARNO + rt_length, rt_index, 0);
ChangeVarNodes(info->rule_qual,
- PRS2_CURRENT_VARNO + rt_length, rt_index, 0);
+ PRS2_OLD_VARNO + rt_length, rt_index, 0);
/*
* bug here about replace CURRENT -- sort of replace current is
result_reln = info->rule_action->resultRelation;
switch (result_reln)
{
- case PRS2_CURRENT_VARNO:
+ case PRS2_OLD_VARNO:
new_result_reln = rt_index;
break;
case PRS2_NEW_VARNO: /* XXX */
OffsetVarNodes((Node *) rule_action, rt_length, 0);
ChangeVarNodes((Node *) rule_qual,
- PRS2_CURRENT_VARNO + rt_length, rt_index, 0);
+ PRS2_OLD_VARNO + rt_length, rt_index, 0);
ChangeVarNodes((Node *) rule_action,
- PRS2_CURRENT_VARNO + rt_length, rt_index, 0);
+ PRS2_OLD_VARNO + rt_length, rt_index, 0);
if (relation_level)
{
rtable = nconc(rtable, copyObject(rule_action->rtable));
new_tree->rtable = rtable;
OffsetVarNodes(new_qual, rt_length, 0);
- ChangeVarNodes(new_qual, PRS2_CURRENT_VARNO + rt_length, rt_index, 0);
+ ChangeVarNodes(new_qual, PRS2_OLD_VARNO + rt_length, rt_index, 0);
}
/* XXX -- where current doesn't work for instead nothing.... yet */
AddNotQual(new_tree, new_qual);
* out of its tuple
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.52 2000/06/10 05:17:23 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.53 2000/06/12 19:40:43 momjian Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
/* ----------
* Now check if any of the used rangetable entries is different
- * from *NEW* and *CURRENT*. If so we must provide the FROM clause
+ * from *NEW* and *OLD*. If so we must provide the FROM clause
* later.
* ----------
*/
continue;
if (!strcmp(rte->ref->relname, "*NEW*"))
continue;
- if (!strcmp(rte->ref->relname, "*CURRENT*"))
+ if (!strcmp(rte->ref->relname, "*OLD*"))
continue;
rt_constonly = FALSE;
quote_identifier(tle->resdom->resname));
}
- /* If we need other tables than *NEW* or *CURRENT* add the FROM clause */
+ /* If we need other tables than *NEW* or *OLD* add the FROM clause */
if (!rt_constonly && rt_numused > 0)
{
sep = " FROM ";
continue;
if (!strcmp(rte->ref->relname, "*NEW*"))
continue;
- if (!strcmp(rte->ref->relname, "*CURRENT*"))
+ if (!strcmp(rte->ref->relname, "*OLD*"))
continue;
appendStringInfo(buf, sep);
List *l;
/* ----------
- * We need to know if other tables than *NEW* or *CURRENT*
+ * We need to know if other tables than *NEW* or *OLD*
* are used in the query. If not, it's an INSERT ... VALUES,
* otherwise an INSERT ... SELECT.
* ----------
continue;
if (!strcmp(rte->ref->relname, "*NEW*"))
continue;
- if (!strcmp(rte->ref->relname, "*CURRENT*"))
+ if (!strcmp(rte->ref->relname, "*OLD*"))
continue;
rt_constonly = FALSE;
quote_identifier(rte->relname));
else if (!strcmp(rte->ref->relname, "*NEW*"))
appendStringInfo(buf, "new.");
- else if (!strcmp(rte->ref->relname, "*CURRENT*"))
+ else if (!strcmp(rte->ref->relname, "*OLD*"))
appendStringInfo(buf, "old.");
else
appendStringInfo(buf, "%s.",
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: primnodes.h,v 1.42 2000/05/25 22:42:19 tgl Exp $
+ * $Id: primnodes.h,v 1.43 2000/06/12 19:40:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define INNER 65000
#define OUTER 65001
-#define PRS2_CURRENT_VARNO 1
-#define PRS2_NEW_VARNO 2
+#define PRS2_OLD_VARNO 1
+#define PRS2_NEW_VARNO 2
typedef struct Var
{
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsetree.h,v 1.9 2000/02/15 03:38:29 thomas Exp $
+ * $Id: parsetree.h,v 1.10 2000/06/12 19:40:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
#define rt_relname(rt_entry) \
- ((!strcmp(((rt_entry)->ref->relname),"*CURRENT*") ||\
+ ((!strcmp(((rt_entry)->ref->relname),"*OLD*") ||\
!strcmp(((rt_entry)->ref->relname),"*NEW*")) ? ((rt_entry)->ref->relname) : \
((char *)(rt_entry)->relname))
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.27 2000/06/09 01:44:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.28 2000/06/12 19:40:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
{"createdb", CREATEDB},
{"createuser", CREATEUSER},
{"cross", CROSS},
+ /* for portability with old rules bjm 2000-06-12 */
+ {"current", OLD},
{"current_date", CURRENT_DATE},
{"current_time", CURRENT_TIME},
{"current_timestamp", CURRENT_TIMESTAMP},
{"of", OF},
{"offset", OFFSET},
{"oids", OIDS},
- {"old", CURRENT},
+ {"old", OLD},
{"on", ON},
{"only", ONLY},
{"operator", OPERATOR},
ISOLATION, JOIN, KEY, LANGUAGE, LEADING, LEFT, LEVEL, LIKE, LOCAL,
MATCH, MINUTE_P, MONTH_P, NAMES,
NATIONAL, NATURAL, NCHAR, NEXT, NO, NOT, NULLIF, NULL_P, NUMERIC,
- OF, ON, ONLY, OPTION, OR, ORDER, OUTER_P, OVERLAPS,
+ OF, OLD, ON, ONLY, OPTION, OR, ORDER, OUTER_P, OVERLAPS,
PARTIAL, POSITION, PRECISION, PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PUBLIC,
READ, REFERENCES, RELATIVE, REVOKE, RIGHT, ROLLBACK,
SCROLL, SECOND_P, SELECT, SESSION_USER, SET, SOME, SUBSTRING,
TABLE, TEMPORARY, THEN, TIME, TIMESTAMP, TIMEZONE_HOUR,
- TIMEZONE_MINUTE, TO, TRAILING, TRANSACTION, TRIM, TRUE_P,
+ TIMEZONE_MINUTE, TO, TRAILING, TRANSACTION, TRIM, TRUE_P,
UNION, UNIQUE, UPDATE, USER, USING,
VALUES, VARCHAR, VARYING, VIEW,
WHEN, WHERE, WITH, WORK, YEAR_P, ZONE
* - Todd A. Brandys 1998-01-01?
*/
%token ABORT_TRANS, ACCESS, AFTER, AGGREGATE, ANALYZE,
- BACKWARD, BEFORE, BINARY, BIT
- CACHE, CLUSTER, COMMENT, COPY, CREATEDB, CREATEUSER, CYCLE,
- DATABASE, DELIMITERS, DO,
- EACH, ENCODING, EXCLUSIVE, EXPLAIN, EXTEND,
- FORCE, FORWARD, FUNCTION, HANDLER,
- INCREMENT, INDEX, INHERITS, INSTEAD, ISNULL,
- LANCOMPILER, LIMIT, LISTEN, UNLISTEN, LOAD, LOCATION, LOCK_P,
- MAXVALUE, MINVALUE, MODE, MOVE,
- NEW, NOCREATEDB, NOCREATEUSER, NONE, NOTHING, NOTIFY, NOTNULL,
- OFFSET, OIDS, OPERATOR, PASSWORD, PROCEDURAL,
- REINDEX, RENAME, RESET, RETURNS, ROW, RULE,
- SEQUENCE, SERIAL, SETOF, SHARE, SHOW, START, STATEMENT, STDIN, STDOUT, SYSID
- TEMP, TRUNCATE, TRUSTED,
- UNDER, UNLISTEN, UNTIL, VACUUM, VALID, VERBOSE, VERSION
+ BACKWARD, BEFORE, BINARY, BIT, CACHE, CLUSTER, COMMENT,
+ COPY, CREATEDB, CREATEUSER, CYCLE, DATABASE,
+ DELIMITERS, DO, EACH, ENCODING, EXCLUSIVE, EXPLAIN,
+ EXTEND, FORCE, FORWARD, FUNCTION, HANDLER, INCREMENT,
+ INDEX, INHERITS, INSTEAD, ISNULL, LANCOMPILER, LIMIT,
+ LISTEN, UNLISTEN, LOAD, LOCATION, LOCK_P, MAXVALUE,
+ MINVALUE, MODE, MOVE, NEW, NOCREATEDB, NOCREATEUSER,
+ NONE, NOTHING, NOTIFY, NOTNULL, OFFSET, OLD, OIDS,
+ OPERATOR, PASSWORD, PROCEDURAL, REINDEX, RENAME, RESET,
+ RETURNS, ROW, RULE, SEQUENCE, SERIAL, SETOF, SHARE,
+ SHOW, START, STATEMENT, STDIN, STDOUT, SYSID TEMP,
+ TRUNCATE, TRUSTED, UNDER, UNLISTEN, UNTIL, VACUUM,
+ VALID, VERBOSE, VERSION
/* Special keywords, not in the query language - see the "lex" file */
%token <str> IDENT SCONST Op CSTRING CVARIABLE CPP_LINE
| ECPGColLabel { $$ = $1; }
;
-SpecialRuleRelation: CURRENT
+SpecialRuleRelation: OLD
{
if (QueryIsRule)
- $$ = make_str("current");
+ $$ = make_str("old");
else
- mmerror(ET_ERROR, "CURRENT used in non-rule query");
+ mmerror(ET_ERROR, "OLD used in non-rule query");
}
| NEW
{
;
ECPGColLabel: ECPGColId { $$ = $1; }
- | ABORT_TRANS { $$ = make_str("abort"); }
+ | ABORT_TRANS { $$ = make_str("abort"); }
| ALL { $$ = make_str("all"); }
- | ANALYZE { $$ = make_str("analyze"); }
+ | ANALYZE { $$ = make_str("analyze"); }
| ANY { $$ = make_str("any"); }
| ASC { $$ = make_str("asc"); }
- | BETWEEN { $$ = make_str("between"); }
- | BINARY { $$ = make_str("binary"); }
- | BIT { $$ = make_str("bit"); }
+ | BETWEEN { $$ = make_str("between"); }
+ | BINARY { $$ = make_str("binary"); }
+ | BIT { $$ = make_str("bit"); }
| BOTH { $$ = make_str("both"); }
- | CASE { $$ = make_str("case"); }
+ | CASE { $$ = make_str("case"); }
| CAST { $$ = make_str("cast"); }
- | CHARACTER { $$ = make_str("character"); }
+ | CHARACTER { $$ = make_str("character"); }
| CHECK { $$ = make_str("check"); }
| CLUSTER { $$ = make_str("cluster"); }
- | COALESCE { $$ = make_str("coalesce"); }
+ | COALESCE { $$ = make_str("coalesce"); }
| COLLATE { $$ = make_str("collate"); }
| COLUMN { $$ = make_str("column"); }
- | CONSTRAINT { $$ = make_str("constraint"); }
+ | CONSTRAINT { $$ = make_str("constraint"); }
| COPY { $$ = make_str("copy"); }
| CROSS { $$ = make_str("cross"); }
- | CURRENT { $$ = make_str("current"); }
- | CURRENT_DATE { $$ = make_str("current_date"); }
- | CURRENT_TIME { $$ = make_str("current_time"); }
+ | CURRENT_DATE { $$ = make_str("current_date"); }
+ | CURRENT_TIME { $$ = make_str("current_time"); }
| CURRENT_TIMESTAMP { $$ = make_str("current_timestamp"); }
| CURRENT_USER { $$ = make_str("current_user"); }
| DEC { $$ = make_str("dec"); }
| DECIMAL { $$ = make_str("decimal"); }
| DEFAULT { $$ = make_str("default"); }
- | DEFERRABLE { $$ = make_str("deferrable"); }
+ | DEFERRABLE { $$ = make_str("deferrable"); }
| DESC { $$ = make_str("desc"); }
| DISTINCT { $$ = make_str("distinct"); }
| DO { $$ = make_str("do"); }
- | ELSE { $$ = make_str("else"); }
- | END_TRANS { $$ = make_str("end"); }
+ | ELSE { $$ = make_str("else"); }
+ | END_TRANS { $$ = make_str("end"); }
| EXCEPT { $$ = make_str("except"); }
| EXISTS { $$ = make_str("exists"); }
| EXPLAIN { $$ = make_str("explain"); }
| FOREIGN { $$ = make_str("foreign"); }
| FROM { $$ = make_str("from"); }
| FULL { $$ = make_str("full"); }
- | IN { $$ = make_str("in"); }
- | IS { $$ = make_str("is"); }
- | ISNULL { $$ = make_str("isnull"); }
+ | IN { $$ = make_str("in"); }
+ | IS { $$ = make_str("is"); }
+ | ISNULL { $$ = make_str("isnull"); }
| GLOBAL { $$ = make_str("global"); }
| GROUP { $$ = make_str("group"); }
| HAVING { $$ = make_str("having"); }
| NEW { $$ = make_str("new"); }
| NONE { $$ = make_str("none"); }
| NOT { $$ = make_str("not"); }
- | NOTNULL { $$ = make_str("notnull"); }
- | NULLIF { $$ = make_str("nullif"); }
+ | NOTNULL { $$ = make_str("notnull"); }
+ | NULLIF { $$ = make_str("nullif"); }
| NULL_P { $$ = make_str("null"); }
- | NUMERIC { $$ = make_str("numeric"); }
+ | NUMERIC { $$ = make_str("numeric"); }
| OFFSET { $$ = make_str("offset"); }
+ | OLD { $$ = make_str("old"); }
| ON { $$ = make_str("on"); }
| OR { $$ = make_str("or"); }
| ORDER { $$ = make_str("order"); }
| OUTER_P { $$ = make_str("outer"); }
- | OVERLAPS { $$ = make_str("overlaps"); }
+ | OVERLAPS { $$ = make_str("overlaps"); }
| POSITION { $$ = make_str("position"); }
| PRECISION { $$ = make_str("precision"); }
| PRIMARY { $$ = make_str("primary"); }
| PROCEDURE { $$ = make_str("procedure"); }
| PUBLIC { $$ = make_str("public"); }
- | REFERENCES { $$ = make_str("references"); }
+ | REFERENCES { $$ = make_str("references"); }
| RESET { $$ = make_str("reset"); }
| RIGHT { $$ = make_str("right"); }
| SELECT { $$ = make_str("select"); }
- | SESSION_USER { $$ = make_str("session_user"); }
+ | SESSION_USER { $$ = make_str("session_user"); }
| SETOF { $$ = make_str("setof"); }
| SHOW { $$ = make_str("show"); }
| SUBSTRING { $$ = make_str("substring"); }
| TABLE { $$ = make_str("table"); }
- | THEN { $$ = make_str("then"); }
+ | THEN { $$ = make_str("then"); }
| TO { $$ = make_str("to"); }
- | TRANSACTION { $$ = make_str("transaction"); }
+ | TRANSACTION { $$ = make_str("transaction"); }
| TRIM { $$ = make_str("trim"); }
| TRUE_P { $$ = make_str("true"); }
| UNIQUE { $$ = make_str("unique"); }
| USING { $$ = make_str("using"); }
| VACUUM { $$ = make_str("vacuum"); }
| VERBOSE { $$ = make_str("verbose"); }
- | WHEN { $$ = make_str("when"); }
+ | WHEN { $$ = make_str("when"); }
| WHERE { $$ = make_str("where"); }
;
pg_indexes | SELECT c.relname AS tablename, i.relname AS indexname, pg_get_indexdef(x.indexrelid) AS indexdef FROM pg_index x, pg_class c, pg_class i WHERE ((c.oid = x.indrelid) AND (i.oid = x.indexrelid));
pg_rules | SELECT c.relname AS tablename, r.rulename, pg_get_ruledef(r.rulename) AS definition FROM pg_rewrite r, pg_class c WHERE ((r.rulename !~ '^_RET'::text) AND (c.oid = r.ev_class));
pg_tables | SELECT c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.reltriggers > 0) AS hastriggers FROM pg_class c WHERE (((c.relkind = 'r'::"char") OR (c.relkind = 's'::"char")) AND (NOT (EXISTS (SELECT pg_rewrite.rulename FROM pg_rewrite WHERE ((pg_rewrite.ev_class = c.oid) AND (pg_rewrite.ev_type = '1'::"char"))))));
- pg_user | SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usecreatetable, pg_shadow.uselocktable, pg_shadow.usetrace, pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd, pg_shadow.valuntil FROM pg_shadow;
+ pg_user | SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usetrace, pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd, pg_shadow.valuntil FROM pg_shadow;
pg_views | SELECT c.relname AS viewname, pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.relname) AS definition FROM pg_class c WHERE (c.relhasrules AND (EXISTS (SELECT r.rulename FROM pg_rewrite r WHERE ((r.ev_class = c.oid) AND (r.ev_type = '1'::"char")))));
rtest_v1 | SELECT rtest_t1.a, rtest_t1.b FROM rtest_t1;
rtest_vcomp | SELECT x.part, (x.size * y.factor) AS size_in_cm FROM rtest_comp x, rtest_unitfact y WHERE (x.unit = y.unit);