Re: Re : [GENERAL] Global value/global variable?

2014-06-19 Thread Edson Richter
I've ended creating a table to store database parameters, and using a subquery, I can achieve the "global variable" effect. Thanks for your insight, Edson. From: edsonrich...@hotmail.com To: pgsql-general@postgresql.org Subject: Re : [GENERAL] Global value/global variable? Date: T

Re : [GENERAL] Global value/global variable?

2014-06-19 Thread Edson Richter
2014 8h44Para: Edson Richter;Assunto:Re: [GENERAL] Global value/global variable?A psql session is shown below:tsh009=# \set lpar '\'LIH1\''tsh009=# select * from capped where lpar=:lpar limit 5; lpar |   started   |    ended     --+-+-

Re: [GENERAL] Global value/global variable?

2014-06-18 Thread Tom Lane
Ian Barwick writes: > On 19/06/14 11:50, Edson Richter wrote: >> It is possible to define a global value/variable in PostgreSQL in a way that >> I can use it in any query/view/function? > There's no such thing as a global variable, but why not use a table > to store any global configuration valu

Re: [GENERAL] Global value/global variable?

2014-06-18 Thread Ian Barwick
On 19/06/14 11:50, Edson Richter wrote: It is possible to define a global value/variable in PostgreSQL in a way that I can use it in any query/view/function? For example, I do have a connection string I use for dblink connections in several places (specially, inside views). Then, if I want to c

[GENERAL] Global value/global variable?

2014-06-18 Thread Edson Richter
It is possible to define a global value/variable in PostgreSQL in a way that I can use it in any query/view/function?For example, I do have a connection string I use for dblink connections in several places (specially, inside views).Then, if I want to change the connection string, I do have to c