(unnamed)

text/plain

Filename: (unnamed)
Type: text/plain
Part: 1
Message: Re: psql: add \pset true/false
#include <stdlib.h>
#include "postgres_fe.h"
#include "catalog/pg_type.h"

char *
outputfilter(char *origcell, int type, bool *mustfree)
{
   char *retcell;

   switch (type)
   {
   case BOOLOID:
     retcell = (*origcell == 't' ? "TRRRRUEEE" : "FAAALSE");
     if (*mustfree) free(origcell);
     *mustfree = false;
     break;
   default:
     retcell = origcell;
     break;
   }
   return retcell;
}