RE: [HACKERS] Libpq functions

From: Magnus Hagander <mha(at)sollentuna(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: hackers(at)postgreSQL(dot)org
Subject: RE: [HACKERS] Libpq functions
Date: 1999-01-09 22:14:48
Message-ID: 215896B6B5E1CF11BC5600805FFEA821012A3080@sirius.edu.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday, January 09, 1999 11:13 PM, Tom Lane [SMTP:tgl(at)sss(dot)pgh(dot)pa(dot)us]
wrote:
> Magnus Hagander <mha(at)sollentuna(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stan Brown 1999-01-10 00:41:21 TCL/TK configure problems
Previous Message Tom Lane 1999-01-09 22:13:11 Re: [HACKERS] Libpq functions