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:
@ -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;
|
||||
|
Reference in New Issue
Block a user