Re: psql command line variables are unknown when -c SQL statement are executed - Mailing list pgsql-bugs

From Pavel Stehule
Subject Re: psql command line variables are unknown when -c SQL statement are executed
Date
Msg-id 162867790911160328w52498540ha50f0eaeebe11a5@mail.gmail.com
Whole thread Raw
In response to Re: psql command line variables are unknown when -c SQL statement are executed  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: psql command line variables are unknown when -c SQL statement are executed  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
2009/11/16 Peter Eisentraut <peter_e@gmx.net>:
> On m=C3=A5n, 2009-11-16 at 10:19 +0100, Pavel Stehule wrote:
>> wrong:
>>
>> pavel@nemesis ~]$ psql postgres -v x=3D10 -c "select :x"
>> ERROR: =C2=A0syntax error at or near ":"
>> LINE 1: select :x
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
>
> This is documented in the psql man page.

I don't see it, Peter?

Is it some reason for it? I don't understand, why this order is correct:

execute statement
process external variables
finish

Pavel

>
>
>

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: psql command line variables are unknown when -c SQL statement are executed
Next
From: "Clark Pearson"
Date:
Subject: BUG #5191: now() returns same value from Perl.