On Wed, Mar 03, 2004 at 08:47:50AM -0500, Bruce Momjian wrote:
> > But yeah, specifying the connection by variable (be it string or
> > connection ptr) would be a definite step forward. Currently you cannot
> > write a generic function like:
> > 
> >  int getit(char *using_connection)
> >  {
> >   EXEC SQL BEGIN DECLARE SECTION;
> >   char *s_connection = using_connection;
> >   int s_it;
> >   EXEC SQL END DECLARE SECTION;
> > 
> >   EXEC SQL AT :s_connection SELECT it INTO :s_it FROM some_table;
> >   return( s_it );
> >  }
> > 
> > which could be run concurrently by multiple threads.

Why? What doesn't work? AFAIRC the AT statement does indeed allow a
variable as connection_target.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to