Re: user defined variable per session

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: "hlavki(at)medium13" <hlavki(at)medium13(dot)sk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: user defined variable per session
Date: 2003-12-07 16:02:01
Message-ID: B157619A-28CE-11D8-9627-0005029FC1A7@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Seum-Lim Gan 2003-12-07 16:02:28 Re: pg_hba.conf change in 7.4
Previous Message Claudio Lapidus 2003-12-07 15:09:32 Re: last update time of a table