As near as I can tell, there are four whole modules of dead code in
src/backend/libpq/: be-dumpdata.c, be-pqexec.c, portal.c, portalbuf.c
(plus some support code in tcop/dest.c).  These provide functions called
PQexec and PQfn, which apparently were once backend-side equivalents
to the frontend-libpq functions of the same names, as well as a whole
bunch of other code that may once have been shared with frontend-libpq,
but is so no longer.

The only externally referenced entry point to these modules is an
undocumented SQL function "pqtest", which I strongly suspect no one
is using.

I am strongly inclined to rip all this stuff out, because it's buggy.
I've already found memory-leak problems and dangling-global-pointer
problems, and there are probably more.  I'd say this code has been
suffering from software rot for a long time.

Does anyone remember what this code was for, or know a reason to keep it
(and fix it) instead of ripping it out?

			regards, tom lane

Thu, 30 Dec 1999 20:50:26 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Is backend-libpq's "PQexec/PQfn/portal" code dead?

Perhaps move to _deadcode directory.  That is usually what we do.

> As near as I can tell, there are four whole modules of dead code in
> src/backend/libpq/: be-dumpdata.c, be-pqexec.c, portal.c, portalbuf.c
> (plus some support code in tcop/dest.c).  These provide functions called
> PQexec and PQfn, which apparently were once backend-side equivalents
> to the frontend-libpq functions of the same names, as well as a whole
> bunch of other code that may once have been shared with frontend-libpq,
> but is so no longer.
> 
> The only externally referenced entry point to these modules is an
> undocumented SQL function "pqtest", which I strongly suspect no one
> is using.
> 
> I am strongly inclined to rip all this stuff out, because it's buggy.
> I've already found memory-leak problems and dangling-global-pointer
> problems, and there are probably more.  I'd say this code has been
> suffering from software rot for a long time.
> 
> Does anyone remember what this code was for, or know a reason to keep it
> (and fix it) instead of ripping it out?
> 
> 			regards, tom lane
> 
> ************
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Thu, 30 Dec 1999 22:34:55 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Is backend-libpq's "PQexec/PQfn/portal" code dead?