From: | Don Baccus <dhogaza(at)pacifier(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] libpq questions...when threads collide |
Date: | 1999-12-12 22:53:13 |
Message-ID: | 3.0.1.32.19991212145313.0104edb0@mail.pacifier.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 05:41 PM 12/12/99 -0500, Tom Lane wrote:
>Don Baccus <dhogaza(at)pacifier(dot)com> writes:
>> Despite the thread unsafeness
>> of PQsetdb et al, I've never seen a failure in this environment
>> and I've never heard of folks experiencing such a failure.
>
>The *only* thing that's actually thread-unsafe, AFAIR, is
>PQconnectdb's use of a global array for connection parameters.
>PQsetdb/setdbLogin are thread-safe; so just use them instead.
Cool! I am using setdbLogin but the documentation sez they,
too, aren't threadsafe...maybe this should be changed? This
is great news.
>At least that was true before the async-connection code got added.
>I haven't looked at that to see if it introduces any problems.
For the moment, I'm happy to believe that it hasn't, it makes my
immediate future much simpler if I do so...
Also, the documentation describes two routines, PQoidStatus and
PQoidValue, but the libpq source seem to only define PQoidStatus.
(some user asked for a routine to feed back the oid of an insert,
so I looked into it while simultaneously suggesting he study
"sequence" and its associated "nextval" and "currval" functions
and ponder on why it's really a bad idea to related tables by
storing oids rather than generated keys)
- Don Baccus, Portland OR <dhogaza(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-12-12 22:54:06 | Re: [HACKERS] 6.6 release |
Previous Message | Tom Lane | 1999-12-12 22:50:48 | Re: [HACKERS] 6.6 release |