Re: [HACKERS] Libpq functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Libpq functions
Date: 1999-01-07 01:16:52
Message-ID: 29237.915671812@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <mha(at)sollentuna(dot)net> writes:
> [ Why is the server-side libpq so crufty? ]

Apparently, that set of files was once used for both the frontend and
backend sides of the FE/BE protocol. It no longer is, but no one has
gotten around to ripping out the now-dead parts of the code, nor to
fixing the comments.

I didn't bother to touch it when I rewrote the client-side libpq last
summer, because there wasn't any functional improvement to be had there.
It pretty much does everything the backend needs done.

If you have the time and energy to clean it up just in the name of
code beautification, step right up :-). One thing that would be good
right off the bat is to change the name --- I think it's confusing to
call both the FE and BE modules libpq, when they are no longer the same
code or even very close.

> Finally - is there any special reason that the backend still uses the (FILE
> *) method to talk to the clients? Using the global Pfout and Pfin variables?
> Wouldn't it be better to be consistent and use the same functions as in the
> revised frontent library?

The main reason for rewriting the front end was to satisfy clients that
didn't want to block while awaiting backend I/O. The backend doesn't
have any comparable requirement: when it's waiting for the frontend, it
has nothing better to do (AFAIK anyway). And using stdio does have its
advantages in simplicity and just plain standard-ness. So I doubt it's
worth making that kind of change.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-01-07 02:30:57 Re: [HACKERS] Re: [PORTS] vacuum takes too long
Previous Message Bruce Momjian 1999-01-07 00:50:37 Re: [PORTS] vacuum takes too long