Home > Archive > PostgreSQL SQL > November 2005 > what is going on in the PostgreSQL









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author what is going on in the PostgreSQL
Eugene E.

2005-11-23, 9:26 am

Hello all !

look

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;


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Michael Fuhr

2005-11-23, 1:28 pm

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/...-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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com