Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.8.8/8.7.5) with ESMTP id UAA03172; Sun, 9 Aug 1998 20:01:33 -0400 (EDT) Received: (from maillist@localhost) by candle.pha.pa.us (8.8.5/8.8.5) id TAA21399; Sun, 9 Aug 1998 19:35:34 -0400 (EDT) From: Bruce Momjian Message-Id: <199808092335.TAA21399@candle.pha.pa.us> Subject: Re: [HACKERS] thread-safe libpq and DBD::Pg In-Reply-To: <4563.902703709@sss.pgh.pa.us> from Tom Lane at "Aug 9, 1998 7: 1:49 pm" To: tgl@sss.pgh.pa.us (Tom Lane) Date: Sun, 9 Aug 1998 19:35:34 -0400 (EDT) Cc: pgsql-interfaces@postgreSQL.org, hackers@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Bruce Momjian 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@candle.pha.pa.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)