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

Re: Totally weird behaviour in org.postgresql.Driver

From: Віталій Тимчишин <tivv00(at)gmail(dot)com>
To: Peter <peter(at)greatnowhere(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Totally weird behaviour in org.postgresql.Driver
Date: 2009-03-17 11:41:50
Message-ID: 331e40660903170441o2f52f36fpb18dcf94ff88d37a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
2009/3/17 Peter <peter(at)greatnowhere(dot)com>

>
> So is there a way to associate user variable with Postgres connection that
> can be picked up by SQL code running in that connection? Right now I can
> only think of PlPerl function that caches user id in a global variable, but
> am not sure about potential pitfalls of such setup...
>

You could use temporary table.
E.g. create temporary table localdata(name, value) as select values('user',
'john');
This will be connection-scope.

In response to

Responses

pgsql-jdbc by date

Next:From: Hannu KrosingDate: 2009-03-17 12:05:19
Subject: Re: Totally weird behaviour in org.postgresql.Driver
Previous:From: Oliver JowettDate: 2009-03-17 11:32:32
Subject: Re: Totally weird behaviour in org.postgresql.Driver

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