diff options
| author | Tom Lane | 2003-05-06 00:20:33 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-05-06 00:20:33 +0000 |
| commit | 2cf57c8f8d060711c1ad7e1dd6cc1115a2839b47 (patch) | |
| tree | b3b2a9616d425072d26cfc57efcbe676c56b399e /src/backend/tcop | |
| parent | 94a3c60324465f98850b60f548c1ea481ab4e52f (diff) | |
Implement feature of new FE/BE protocol whereby RowDescription identifies
the column by table OID and column number, if it's a simple column
reference. Along the way, get rid of reskey/reskeyop fields in Resdoms.
Turns out that representation was not convenient for either the planner
or the executor; we can make the planner deliver exactly what the
executor wants with no more effort.
initdb forced due to change in stored rule representation.
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/dest.c | 4 | ||||
| -rw-r--r-- | src/backend/tcop/postgres.c | 14 | ||||
| -rw-r--r-- | src/backend/tcop/pquery.c | 16 |
3 files changed, 25 insertions, 9 deletions
diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c index a5905dedc7f..54b5ef75c1a 100644 --- a/src/backend/tcop/dest.c +++ b/src/backend/tcop/dest.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.55 2003/05/05 00:44:56 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.56 2003/05/06 00:20:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -46,7 +46,7 @@ donothingReceive(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self) static void donothingSetup(DestReceiver *self, int operation, - const char *portalName, TupleDesc typeinfo) + const char *portalName, TupleDesc typeinfo, List *targetlist) { } diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index d57ccd973b2..d9172655e2a 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.332 2003/05/05 00:44:56 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.333 2003/05/06 00:20:33 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1460,7 +1460,15 @@ exec_describe_portal_message(const char *portal_name) return; /* can't actually do anything... */ if (portal->tupDesc) - SendRowDescriptionMessage(portal->tupDesc); + { + List *targetlist; + + if (portal->strategy == PORTAL_ONE_SELECT) + targetlist = ((Plan *) lfirst(portal->planTrees))->targetlist; + else + targetlist = NIL; + SendRowDescriptionMessage(portal->tupDesc, targetlist); + } else pq_putemptymessage('n'); /* NoData */ } @@ -2335,7 +2343,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.332 $ $Date: 2003/05/05 00:44:56 $\n"); + puts("$Revision: 1.333 $ $Date: 2003/05/06 00:20:33 $\n"); } /* diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index f70b9132244..280f269c8f8 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.60 2003/05/02 20:54:35 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.61 2003/05/06 00:20:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -136,7 +136,7 @@ ProcessQuery(Query *parsetree, /* * Call ExecStart to prepare the plan for execution */ - ExecutorStart(queryDesc); + ExecutorStart(queryDesc, false); /* * Run the plan to completion. @@ -256,7 +256,7 @@ PortalStart(Portal portal, ParamListInfo params) /* * Call ExecStart to prepare the plan for execution */ - ExecutorStart(queryDesc); + ExecutorStart(queryDesc, false); /* * This tells PortalCleanup to shut down the executor */ @@ -571,10 +571,18 @@ RunFromStore(Portal portal, ScanDirection direction, long count, CommandDest dest) { DestReceiver *destfunc; + List *targetlist; long current_tuple_count = 0; destfunc = DestToFunction(dest); - (*destfunc->setup) (destfunc, CMD_SELECT, portal->name, portal->tupDesc); + + if (portal->strategy == PORTAL_ONE_SELECT) + targetlist = ((Plan *) lfirst(portal->planTrees))->targetlist; + else + targetlist = NIL; + + (*destfunc->setup) (destfunc, CMD_SELECT, portal->name, portal->tupDesc, + targetlist); if (direction == NoMovementScanDirection) { |
