From: | "Aasmund Midttun Godal" <postgresql(at)envisity(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Variables. |
Date: | 2001-10-17 01:00:54 |
Message-ID: | 20011017010054.28016.qmail@ns.krot.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
I would really like a feature :)
I do not know whether it is part of the SQL standard.
Variables...
e.g.
CREATE VARIABLE foobar INTEGER DEFAULT 1 NOT NULL;
SELECT * FROM thebar WHERE id = foobar;
CREATE TEMPORARY VARIABLE...
CREATE CONSTANT....
Basically all the functionality from the table columns (CHECK and REFERENCES...) and it must take any type, so that you can use user-created types as well.
SET foobar 3;
it could adopt properties from both runtime info and sequences...
My abilities in C, as in many other things is severely limited so I am asking someone else to do the dirtywork :). And I do appreciate that this may take some time.
It would be nice to have some sort of GRANT revoke SCHEME on it too...
I do acknowledge that this can be achieved with temporary and non temporary tables, but it can get ugly with these.
While I am at it I would highly suggest that there is some sort of SESSION_ID environment variable.
Some of the uses:
* Store things like personal preferences
* Parameters from a webserver
* Client application name
* etc.
Aasmund Midttun Godal
aasmund(at)godal(dot)com - http://www.godal.com/
+47 40 45 20 46
From | Date | Subject | |
---|---|---|---|
Next Message | Steven Dahlin | 2001-10-17 03:10:04 | nvl() function |
Previous Message | Marc G. Fournier | 2001-10-17 00:27:19 | Re: Why are ftp mirrors out of sync? |