dbTalk Databases Forums  

[BUGS] session variable

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] session variable in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sad
 
Posts: n/a

Default [BUGS] session variable - 09-01-2003 , 09:10 AM






Good day

is it possible to define user variables in session ?
If not then is it planned to implement ?
or it is principially impossible in PosqtgreSQL


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] session variable - 09-01-2003 , 11:58 AM






sad wrote:
Quote:
Good day

is it possible to define user variables in session ?
If not then is it planned to implement ?
or it is principially impossible in PosqtgreSQL
psql has variables, but in general we don't support session varibles.
You could create a temp table and put a value in there easily.

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
  #3  
Old   
sad
 
Posts: n/a

Default Re: [BUGS] session variable - 09-02-2003 , 07:27 AM



On Monday 01 September 2003 20:57, you wrote:
Quote:
sad wrote:
Good day

is it possible to define user variables in session ?
If not then is it planned to implement ?
or it is principially impossible in PosqtgreSQL

psql has variables, but in general we don't support session varibles.
You could create a temp table and put a value in there easily.
that's ok, unless i need to access it in a trigger.

where may i ask a programming and perfomance question?
i think mailing such questions to "BUGS" is not a good idea.=20


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #4  
Old   
Andreas Pflug
 
Posts: n/a

Default Re: [BUGS] session variable - 09-02-2003 , 07:41 AM



sad wrote:

Quote:
is it possible to define user variables in session ?
If not then is it planned to implement ?
or it is principially impossible in PosqtgreSQL


psql has variables, but in general we don't support session varibles.
You could create a temp table and put a value in there easily.



that's ok, unless i need to access it in a trigger.

No problem to use a temp table in a trigger (which is local to the
session), I do so myself. Still, session variables would be nice, making
coding a little bit more comfortable.

Quote:
where may i ask a programming and perfomance question?
i think mailing such questions to "BUGS" is not a good idea.

Just use the pgsql-sql and pgsql-performance mailing lists.


Regards,
Andreas



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #5  
Old   
Andreas Pflug
 
Posts: n/a

Default Re: [BUGS] session variable - 09-02-2003 , 05:52 PM



Bupp Phillips wrote:

Quote:
Could you possible have some type of variable (preferably the Transaction
ID) that can identify an individual process?

There's pg_backend_pid() for 7.4 and backend_pid() as contrib module for
earlier releases.

Regards,
Andreas



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
  #6  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] session variable - 09-03-2003 , 12:55 PM



sad wrote:
Quote:
On Monday 01 September 2003 20:57, you wrote:
sad wrote:
Good day

is it possible to define user variables in session ?
If not then is it planned to implement ?
or it is principially impossible in PosqtgreSQL

psql has variables, but in general we don't support session varibles.
You could create a temp table and put a value in there easily.

that's ok, unless i need to access it in a trigger.
Why can't you grab it out of the temp table from the trigger?

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.