mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
First phase of SCHEMA changes, concentrating on fixing the grammar and
the parsetree representation. As yet we don't *do* anything with schema names, just drop 'em on the floor; but you can enter schema-compatible command syntax, and there's even a primitive CREATE SCHEMA command. No doc updates yet, except to note that you can now extract a field from a function-returning-row's result with (foo(...)).fieldname.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.62 2002/03/12 00:51:58 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.63 2002/03/21 16:01:17 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -573,9 +573,9 @@ getInsertSelectQuery(Query *parsetree, Query ***subquery_ptr)
|
||||
* they've been pushed down to the SELECT.
|
||||
*/
|
||||
if (length(parsetree->rtable) >= 2 &&
|
||||
strcmp(rt_fetch(PRS2_OLD_VARNO, parsetree->rtable)->eref->relname,
|
||||
strcmp(rt_fetch(PRS2_OLD_VARNO, parsetree->rtable)->eref->aliasname,
|
||||
"*OLD*") == 0 &&
|
||||
strcmp(rt_fetch(PRS2_NEW_VARNO, parsetree->rtable)->eref->relname,
|
||||
strcmp(rt_fetch(PRS2_NEW_VARNO, parsetree->rtable)->eref->aliasname,
|
||||
"*NEW*") == 0)
|
||||
return parsetree;
|
||||
Assert(parsetree->jointree && IsA(parsetree->jointree, FromExpr));
|
||||
@ -589,9 +589,9 @@ getInsertSelectQuery(Query *parsetree, Query ***subquery_ptr)
|
||||
selectquery->commandType == CMD_SELECT))
|
||||
elog(ERROR, "getInsertSelectQuery: expected to find SELECT subquery");
|
||||
if (length(selectquery->rtable) >= 2 &&
|
||||
strcmp(rt_fetch(PRS2_OLD_VARNO, selectquery->rtable)->eref->relname,
|
||||
strcmp(rt_fetch(PRS2_OLD_VARNO, selectquery->rtable)->eref->aliasname,
|
||||
"*OLD*") == 0 &&
|
||||
strcmp(rt_fetch(PRS2_NEW_VARNO, selectquery->rtable)->eref->relname,
|
||||
strcmp(rt_fetch(PRS2_NEW_VARNO, selectquery->rtable)->eref->aliasname,
|
||||
"*NEW*") == 0)
|
||||
{
|
||||
if (subquery_ptr)
|
||||
|
Reference in New Issue
Block a user