On Saturday, January 09, 1999 11:13 PM, Tom Lane [SMTP:tgl@sss.pgh.pa.us]
wrote:
> Magnus Hagander <mha@sollentuna.net> writes:
> > Well, I see one reason to change it. Which is why I came up with the
> > question in the first place. I was looking at the possibility of putting
SSL
> > on top of libpq. I have a project I'm working on that needs to transmit
> > "lightly sensitive data" across the internet. Right now using SSH
> > forwardings, but that's not exactly the "ideal solution".
> > Anyway, SSLeay has functions that replace read() and write(), but
nothing to
> > work with FILE *:s.
> > So if there are no major objections, I might take a shot at changing it
to
> > working directly on the socket, and put SSLeay on it.
> 
> Ah.  Now that you mention it, I recall someone bringing up that exact
> issue last summer on the hackers list.  Was that you?  If not, you might
> want to go digging in the list archives (I forget what was said...)

Could've been me. I'll go check to be sure.
I remember fighting this same obstacle in the frontend library before you
fixed it - because Win32 does not handle fdopen() on sockets.


Also, I noticed that in backend/util/error/elog.c, it checks for "Pfout !=
NULL" to see if it's running under the postmaster. If Pfout == NULL, it
sends its data out to stderr instead of the client.
Shouldn't it be safe to just if on the global "IsUnderPostmaster" boolean
here? Or am I missing something? (I'm starting my work by trying to get rid
of anything other than pqcomm.c using Pfout and Pfin).

//Magnus

Sat, 9 Jan 1999 23:14:48 +0100 
Magnus Hagander <mha@sollentuna.net>
RE: [HACKERS] Libpq functions 
> Also, I noticed that in backend/util/error/elog.c, it checks for "Pfout !=
> NULL" to see if it's running under the postmaster. If Pfout == NULL, it
> sends its data out to stderr instead of the client.
> Shouldn't it be safe to just if on the global "IsUnderPostmaster" boolean
> here? Or am I missing something? (I'm starting my work by trying to get rid
> of anything other than pqcomm.c using Pfout and Pfin).

Not sure, but it is possible the coder didn't know about the variable.

-- 
  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

Sat, 9 Jan 1999 20:43:26 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Libpq functions