From 95ef6a344821655ce4d0a74999ac49dd6af6d342 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 21 Mar 2002 16:02:16 +0000 Subject: 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. --- src/backend/executor/spi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/executor/spi.c') diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index c8c65b1cee4..f09f90744e8 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.67 2002/02/27 19:34:59 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.68 2002/03/21 16:00:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -775,7 +775,8 @@ SPI_cursor_open(char *name, void *plan, Datum *Values, char *Nulls) /* Modify the parsetree to be a cursor */ queryTree->isPortal = true; - queryTree->into = pstrdup(name); + queryTree->into = makeNode(RangeVar); + queryTree->into->relname = pstrdup(name); queryTree->isBinary = false; /* Create the QueryDesc object and the executor state */ @@ -1145,7 +1146,7 @@ _SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount) if (parseTree->isPortal) { isRetrieveIntoPortal = true; - intoName = parseTree->into; + intoName = parseTree->into->relname; parseTree->isBinary = false; /* */ return SPI_ERROR_CURSOR; -- cgit v1.2.3