Re: what is going on in the PostgreSQL

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Eugene E(dot)" <sad(at)bankir(dot)ru>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: what is going on in the PostgreSQL
Date: 2005-11-23 18:09:58
Message-ID: 20051123180957.GA3907@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Nov 23, 2005 at 02:54:27PM +0300, Eugene E. wrote:
> template1=> \set a select
> template1=> \set b 1
> template1=> :a :b;
>
> column
> ------
> 1
>
> hope this is only psql's feathure not the server's one;

What about this do you find surprising? Have you read the psql
documentation regarding \set, variables, and interpolation?

http://www.postgresql.org/docs/8.1/interactive/app-psql.html#APP-PSQL-VARIABLES

test=> \set a select
test=> \set b 1
test=> \set ECHO queries
test=> :a :b;
select 1;
?column?
----------
1
(1 row)

--
Michael Fuhr

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ken Winter 2005-11-24 04:23:05
Previous Message Tom Lane 2005-11-23 17:23:00 Re: unplanned sub-select error?