Re: [HACKERS] Multiple psql -c / -f options

2013-10-18 Thread Fabien COELHO
IMHO the current behavior is broken: decibel@decina:[17:46]~/pgsql/HEAD/i$bin/psql -c 'select 1' -c 'select 2' ?column? -- 2 (1 row) Another try with one -c but with similar results: sh psql -c SELECT 1; SELECT 'hello'; ?column? -- hello (1 row)

Re: [HACKERS] Multiple psql -c / -f options

2013-10-18 Thread Andrew Dunstan
On 10/18/2013 02:19 AM, Fabien COELHO wrote: IMHO the current behavior is broken: decibel@decina:[17:46]~/pgsql/HEAD/i$bin/psql -c 'select 1' -c 'select 2' ?column? -- 2 (1 row) Another try with one -c but with similar results: sh psql -c SELECT 1; SELECT 'hello';

Re: [HACKERS] Multiple psql -c / -f options

2013-10-18 Thread Jim Nasby
On 10/18/13 8:39 AM, Andrew Dunstan wrote: On 10/18/2013 02:19 AM, Fabien COELHO wrote: IMHO the current behavior is broken: decibel@decina:[17:46]~/pgsql/HEAD/i$bin/psql -c 'select 1' -c 'select 2' ?column? -- 2 (1 row) Another try with one -c but with similar results:

[HACKERS] Multiple psql -c / -f options

2013-10-17 Thread Jim Nasby
IMHO the current behavior is broken: decibel@decina:[17:46]~/pgsql/HEAD/i$bin/psql -c 'select 1' -c 'select 2' ?column? -- 2 (1 row) I would expect psql to either run both commands or throw an error. What I'd personally prefer is that psql execute -c and -f (and arguably -v)