@ -26,9 +26,9 @@
static void printtup_startup ( DestReceiver * self , int operation ,
static void printtup_startup ( DestReceiver * self , int operation ,
TupleDesc typeinfo ) ;
TupleDesc typeinfo ) ;
static void printtup ( TupleTableSlot * slot , DestReceiver * self ) ;
static bool printtup ( TupleTableSlot * slot , DestReceiver * self ) ;
static void printtup_20 ( TupleTableSlot * slot , DestReceiver * self ) ;
static bool printtup_20 ( TupleTableSlot * slot , DestReceiver * self ) ;
static void printtup_internal_20 ( TupleTableSlot * slot , DestReceiver * self ) ;
static bool printtup_internal_20 ( TupleTableSlot * slot , DestReceiver * self ) ;
static void printtup_shutdown ( DestReceiver * self ) ;
static void printtup_shutdown ( DestReceiver * self ) ;
static void printtup_destroy ( DestReceiver * self ) ;
static void printtup_destroy ( DestReceiver * self ) ;
@ -299,7 +299,7 @@ printtup_prepare_info(DR_printtup *myState, TupleDesc typeinfo, int numAttrs)
* printtup - - - print a tuple in protocol 3.0
* printtup - - - print a tuple in protocol 3.0
* - - - - - - - - - - - - - - - -
* - - - - - - - - - - - - - - - -
*/
*/
static void
static bool
printtup ( TupleTableSlot * slot , DestReceiver * self )
printtup ( TupleTableSlot * slot , DestReceiver * self )
{
{
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
@ -376,13 +376,15 @@ printtup(TupleTableSlot *slot, DestReceiver *self)
/* Return to caller's context, and flush row's temporary memory */
/* Return to caller's context, and flush row's temporary memory */
MemoryContextSwitchTo ( oldcontext ) ;
MemoryContextSwitchTo ( oldcontext ) ;
MemoryContextReset ( myState - > tmpcontext ) ;
MemoryContextReset ( myState - > tmpcontext ) ;
return true ;
}
}
/* ----------------
/* ----------------
* printtup_20 - - - print a tuple in protocol 2.0
* printtup_20 - - - print a tuple in protocol 2.0
* - - - - - - - - - - - - - - - -
* - - - - - - - - - - - - - - - -
*/
*/
static void
static bool
printtup_20 ( TupleTableSlot * slot , DestReceiver * self )
printtup_20 ( TupleTableSlot * slot , DestReceiver * self )
{
{
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
@ -452,6 +454,8 @@ printtup_20(TupleTableSlot *slot, DestReceiver *self)
/* Return to caller's context, and flush row's temporary memory */
/* Return to caller's context, and flush row's temporary memory */
MemoryContextSwitchTo ( oldcontext ) ;
MemoryContextSwitchTo ( oldcontext ) ;
MemoryContextReset ( myState - > tmpcontext ) ;
MemoryContextReset ( myState - > tmpcontext ) ;
return true ;
}
}
/* ----------------
/* ----------------
@ -528,7 +532,7 @@ debugStartup(DestReceiver *self, int operation, TupleDesc typeinfo)
* debugtup - print one tuple for an interactive backend
* debugtup - print one tuple for an interactive backend
* - - - - - - - - - - - - - - - -
* - - - - - - - - - - - - - - - -
*/
*/
void
bool
debugtup ( TupleTableSlot * slot , DestReceiver * self )
debugtup ( TupleTableSlot * slot , DestReceiver * self )
{
{
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
@ -553,6 +557,8 @@ debugtup(TupleTableSlot *slot, DestReceiver *self)
printatt ( ( unsigned ) i + 1 , typeinfo - > attrs [ i ] , value ) ;
printatt ( ( unsigned ) i + 1 , typeinfo - > attrs [ i ] , value ) ;
}
}
printf ( " \t ---- \n " ) ;
printf ( " \t ---- \n " ) ;
return true ;
}
}
/* ----------------
/* ----------------
@ -564,7 +570,7 @@ debugtup(TupleTableSlot *slot, DestReceiver *self)
* This is largely same as printtup_20 , except we use binary formatting .
* This is largely same as printtup_20 , except we use binary formatting .
* - - - - - - - - - - - - - - - -
* - - - - - - - - - - - - - - - -
*/
*/
static void
static bool
printtup_internal_20 ( TupleTableSlot * slot , DestReceiver * self )
printtup_internal_20 ( TupleTableSlot * slot , DestReceiver * self )
{
{
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
TupleDesc typeinfo = slot - > tts_tupleDescriptor ;
@ -636,4 +642,6 @@ printtup_internal_20(TupleTableSlot *slot, DestReceiver *self)
/* Return to caller's context, and flush row's temporary memory */
/* Return to caller's context, and flush row's temporary memory */
MemoryContextSwitchTo ( oldcontext ) ;
MemoryContextSwitchTo ( oldcontext ) ;
MemoryContextReset ( myState - > tmpcontext ) ;
MemoryContextReset ( myState - > tmpcontext ) ;
return true ;
}
}