Re: Thread safe connection-name mapping in ECPG. Is it

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thread safe connection-name mapping in ECPG. Is it
Date: 2004-02-27 15:29:10
Message-ID: 200402272059.10660.shridhar@frodo.hserus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday 27 February 2004 20:54, Michael Meskes wrote:
> On Fri, Feb 27, 2004 at 04:22:33PM +0530, Shridhar Daithankar wrote:
> > How about, allowing 'connection *'? If somebody puts a 'connection *'
> > there it is used. If it is a string a name search is performed. Best of
> > both worlds.
>
> How shall anyone put a pointer to a connection struct inside the SQL
> statement?
>
> It would help me a lot if you'd be able to give some examples.

EXEC SQL BEGIN DECLARE SECTION;
connect *connectionPtr;
EXEC SQL END DECLARE SECTION;

EXEC SQL CONNECT TO db AS connectionPtr;
EXEC SQL AT connectionPtr SELECT 1;

After all, it is matter of parsing some code and emitting equivalent C code,
isn't it?

Shridhar

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-02-27 16:39:05 Re: CVS HEAD compile warning
Previous Message scott.marlowe 2004-02-27 15:28:31 Re: Tablespaces