Re: Thread safe connection-name mapping in ECPG. Is it required? - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: Thread safe connection-name mapping in ECPG. Is it required?
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184CFEF@m0114.s-mxs.net
Whole thread Raw
In response to Thread safe connection-name mapping in ECPG. Is it required?  (Shridhar Daithankar <shridhar@frodo.hserus.net>)
List pgsql-hackers
> I'm not sure I understand you correctly. The SQL standard says you can
> call your statement as this:
> exec sql at CONNECTION select 1;
>
> Here CONNECTION of course is a string, the name of the connection. So,
> yes, we have to maintain that list to make sure we get the right
> connection.

I thought the main problem was an "exec sql set connection :hostvar",
where hostvar is a string determined at runtime. Else above could be translated at
precompile time to anything more efficient than a string search.

Oh, just noticed above is not standard, but sure is very useful.

Andreas


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: Tablespaces
Next
From: Shridhar Daithankar
Date:
Subject: Re: Thread safe connection-name mapping in ECPG. Is it