Re: psql command line variables are unknown when -c SQL statement are executed

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: psql command line variables are unknown when -c SQL statement are executed
Date: 2009-11-16 11:28:53
Message-ID: 162867790911160328w52498540ha50f0eaeebe11a5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

2009/11/16 Peter Eisentraut <peter_e(at)gmx(dot)net>:
> On mån, 2009-11-16 at 10:19 +0100, Pavel Stehule wrote:
>> wrong:
>>
>> pavel(at)nemesis ~]$ psql postgres -v x=10 -c "select :x"
>> ERROR:  syntax error at or near ":"
>> LINE 1: select :x
>>                ^
>
> 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

>
>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Clark Pearson 2009-11-16 17:59:21 BUG #5191: now() returns same value from Perl.
Previous Message Peter Eisentraut 2009-11-16 11:23:58 Re: psql command line variables are unknown when -c SQL statement are executed