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

2009-11-18 Thread Pavel Stehule
2009/11/18 Peter Eisentraut : > On mån, 2009-11-16 at 12:28 +0100, Pavel Stehule wrote: >> 2009/11/16 Peter Eisentraut : >> > On mån, 2009-11-16 at 10:19 +0100, Pavel Stehule wrote: >> >> wrong: >> >> >> >> pa...@nemesis ~]$ psql postgres -v x=10 -c "select :x" >> >> ERROR:  syntax error at or near

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

2009-11-18 Thread Peter Eisentraut
On mån, 2009-11-16 at 12:28 +0100, Pavel Stehule wrote: > 2009/11/16 Peter Eisentraut : > > On mån, 2009-11-16 at 10:19 +0100, Pavel Stehule wrote: > >> wrong: > >> > >> pa...@nemesis ~]$ psql postgres -v x=10 -c "select :x" > >> ERROR: syntax error at or near ":" > >> LINE 1: select :x > >>

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

2009-11-16 Thread Pavel Stehule
2009/11/16 Peter Eisentraut : > On mån, 2009-11-16 at 10:19 +0100, Pavel Stehule wrote: >> wrong: >> >> pa...@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

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

2009-11-16 Thread Peter Eisentraut
On mån, 2009-11-16 at 10:19 +0100, Pavel Stehule wrote: > wrong: > > pa...@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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@pos

[BUGS] psql command line variables are unknown when -c SQL statement are executed

2009-11-16 Thread Pavel Stehule
wrong: pa...@nemesis ~]$ psql postgres -v x=10 -c "select :x" ERROR: syntax error at or near ":" LINE 1: select :x ^ good (workaround): [pa...@nemesis ~]$ echo 'select :x' | psql postgres -v x=10 ?column? ── 10 (1 row) psql have to have process external variables