1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

Add INSERT/UPDATE/DELETE RETURNING, with basic docs and regression tests.

plpgsql support to come later.  Along the way, convert execMain's
SELECT INTO support into a DestReceiver, in order to eliminate some ugly
special cases.

Jonah Harris and Tom Lane
This commit is contained in:
Tom Lane
2006-08-12 02:52:06 +00:00
parent 5c9e9c0c42
commit 7a3e30e608
35 changed files with 1472 additions and 422 deletions

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/dest.c,v 1.68 2006/03/05 15:58:40 momjian Exp $
* $PostgreSQL: pgsql/src/backend/tcop/dest.c,v 1.69 2006/08/12 02:52:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,6 +30,7 @@
#include "access/printtup.h"
#include "access/xact.h"
#include "executor/executor.h"
#include "executor/tstoreReceiver.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
@@ -124,6 +125,9 @@ CreateDestReceiver(CommandDest dest, Portal portal)
elog(ERROR, "portal has no holdStore");
return CreateTuplestoreDestReceiver(portal->holdStore,
portal->holdContext);
case DestIntoRel:
return CreateIntoRelDestReceiver();
}
/* should never get here */
@@ -148,6 +152,7 @@ EndCommand(const char *commandTag, CommandDest dest)
case DestDebug:
case DestSPI:
case DestTuplestore:
case DestIntoRel:
break;
}
}
@@ -186,6 +191,7 @@ NullCommand(CommandDest dest)
case DestDebug:
case DestSPI:
case DestTuplestore:
case DestIntoRel:
break;
}
}
@@ -226,6 +232,7 @@ ReadyForQuery(CommandDest dest)
case DestDebug:
case DestSPI:
case DestTuplestore:
case DestIntoRel:
break;
}
}