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)
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';
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:
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)