Re: why no create variable - Mailing list pgsql-general

From
Subject Re: why no create variable
Date
Msg-id 20120318052632.c760ddbd7c0975bc4b045766db7d895c.c575a910fa.wbe@email16.secureserver.net
Whole thread Raw
In response to why no create variable  (<mgould@isstrucksoftware.net>)
Responses Re: why no create variable
List pgsql-general
create table works but causes a lot of selects through out the program to get various settings when using CREATE Variable and have it global means that you can set these values once when doing your init routine and not have to continuously go back to the table in every stored procedure to get the same data over and over.  In my case I almost 99% of the time set these values from table values and then use them in read only mode.  These are things that are normally static.  I also have a group of "flags" that get initialized to 0 and can get set to 1 to help determine actions to take in a stored procedure.

Getting the information from a table works.  I now have a sessionsettings table, but I'm making way to many calls to it because there is no global pool of variable.  Not IMO an efficient use of a table.

Michael Gould
Intermodal Software Solutions, LLC
904-226-0978


-------- Original Message --------
Subject: Re: [GENERAL] why no create variable
From: Jasen Betts <jasen@xnet.co.nz>
Date: Sat, March 17, 2012 9:57 pm
To: pgsql-general@postgresql.org

On 2012-03-08, <mgould@isstrucksoftware.net> <mgould@isstrucksoftware.net> wrote:
> There seems to be CREATE everything in Postgres but it would be really
> nice to have a CREATE VARIABLE which would allow us to create global
> variables. I know there are other techniques but this would be the
> easiest when doing a init routine when a user logs in to the
> application.

create a table.

--
⚂⚃ 100% natural


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Mark Felder
Date:
Subject: Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?
Next
From: Chris Angelico
Date:
Subject: Re: why no create variable