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.