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

From Claudio Lapidus
Subject Re: user defined variable per session
Date
Msg-id BAY7-DAV29zbwz1cKps0000517c@hotmail.com
Whole thread Raw
In response to user defined variable per session  (Miso Hlavac <hlavki@medium13.sk>)
Responses Re: user defined variable per session
List pgsql-general
> 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???

What about

test=> \set myvar 5
test=> select :myvar;
 ?column?
----------
        5
(1 row)

hth
cl.

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: postgresql locks the whole table!
Next
From: Martin Marques
Date:
Subject: GRANT ON C