Re: [HACKERS] thread-safe libpq and DBD::Pg

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgsql-interfaces(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] thread-safe libpq and DBD::Pg
Date: 1998-08-09 23:35:34
Message-ID: 199808092335.TAA21399@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> > php3 uses PQoidStatus, so I can imagine great problems if we change the
> > libpq interface. I am afraid we are stuck with char*.
>
> Yeah, I can't really see breaking applications just for a marginal
> improvement in cleanliness.
>
> There is a possible compromise however: we could leave PQcmdTuples and
> PQoidStatus defined as-is (but do something to get rid of PQoidStatus'
> use of a static return area), and add two more functions that have more
> reasonable return conventions. The documentation could describe the
> older functions as deprecated.
>
> Perhaps the int-returning forms could be named "PQCmdTuples" and
> "PQOidStatus" (note difference in capitalization) ... unless someone
> has a better idea.
>
> Does anyone think this is worth the trouble, or shall we leave bad
> enough alone?

Perhaps we can leave the change for a time when we want to change the
libpq interface in a more significant way. Having two functions just
seems like a waste for such a rarely-called fuction.

>
> I do intend to get rid of the static return area for PQoidStatus in any
> case. I'd also like to fix the problem with PQconninfoOptions not being
> treated as a constant (specifically, the "val" fields are being used as
> working storage). Is anyone aware of any applications that would be
> broken by removing "val" from the PQconninfoOption struct?
>
> regards, tom lane
>

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-08-10 00:09:57 Re: [HACKERS] Re: type coersion (was OR clause status)
Previous Message Bruce Momjian 1998-08-09 23:33:59 Re: [HACKERS] Re: type coersion (was OR clause status)

Browse pgsql-interfaces by date

  From Date Subject
Next Message Goran Thyni 1998-08-10 07:19:50 Re: [INTERFACES] Re: thread-safe libpq and DBD::Pg
Previous Message Tom Lane 1998-08-09 23:01:49 Re: [HACKERS] thread-safe libpq and DBD::Pg