Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] library policy question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Michael Meskes <meskes(at)postgreSQL(dot)org>, PostgreSQL Hacker <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] library policy question
Date: 2000-03-08 19:49:32
Message-ID: 26519.952544972@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
>> And what shall I do with sqlca? Make every program define it in its own 
>> space?

> My vague recollection is that embedded SQL doesn't multithread very
> well for exactly this reason. You may be stuck with a global variable
> for that case...

Aside from the unthreadable API, ecpg has another potential threading
problem: it depends on a lexer and parser that might or might not be
thread-safe, depending on what they were generated with.

I'd advise just labeling ecpg "not threadable" :-(.  Not much point in
breaking existing apps by changing the API, when you still won't be able
to guarantee thread safeness...

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-03-08 19:54:23
Subject: Re: [HACKERS] Transaction abortions & recovery handling
Previous:From: Bruce MomjianDate: 2000-03-08 19:35:01
Subject: Re: [HACKERS] Regression test failure (runcheck)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group