Re: user defined variable per session - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: user defined variable per session
Date
Msg-id B157619A-28CE-11D8-9627-0005029FC1A7@myrealbox.com
Whole thread Raw
In response to user defined variable per session  (Miso Hlavac <hlavki@medium13.sk>)
List pgsql-general
On Sunday, December 7, 2003, at 11:38 PM, Miso Hlavac wrote:

> Hello,
>
> I need to create user defined variable in every database session.
> In Sybase ASA is equivalent:
> CREATE VARIABLE name TYPE;
>
> I need use this in views. Is it possible???

Would it be possible to use a temp (very simple) temp table to do this?
For example

CREATE TEMP TABLE variable (value INT);

for an integer variable. Then just use UPDATE and SELECT to set and
return the variable.

Michael
grzm myrealbox com


pgsql-general by date:

Previous
From: Seum-Lim Gan
Date:
Subject: Re: pg_hba.conf change in 7.4
Next
From: Tom Lane
Date:
Subject: Re: CREATE RULE problem/question requesting workaround