1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Make tuple receive/print routines TOAST-aware. Formerly, printtup would

leak memory when printing a toasted attribute, and printtup_internal
didn't work at all...
This commit is contained in:
Tom Lane
2000-12-01 22:10:31 +00:00
parent f5371feef9
commit 217d1566bf
4 changed files with 172 additions and 108 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.40 2000/10/22 22:14:55 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.41 2000/12/01 22:10:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -69,9 +69,6 @@ donothingCleanup(DestReceiver *self)
static DestReceiver donothingDR = {
donothingReceive, donothingSetup, donothingCleanup
};
static DestReceiver printtup_internalDR = {
printtup_internal, donothingSetup, donothingCleanup
};
static DestReceiver debugtupDR = {
debugtup, donothingSetup, donothingCleanup
};
@ -180,11 +177,10 @@ DestToFunction(CommandDest dest)
switch (dest)
{
case Remote:
/* printtup wants a dynamically allocated DestReceiver */
return printtup_create_DR();
return printtup_create_DR(false);
case RemoteInternal:
return &printtup_internalDR;
return printtup_create_DR(true);
case Debug:
return &debugtupDR;