Re: BUG #9198: psql -c 'SET; ...' not working - Mailing list pgsql-bugs

From David Johnston
Subject Re: BUG #9198: psql -c 'SET; ...' not working
Date
Msg-id 1392307160231-5791870.post@n5.nabble.com
Whole thread Raw
In response to Re: BUG #9198: psql -c 'SET; ...' not working  (Matheus de Oliveira <matioli.matheus@gmail.com>)
Responses Re: BUG #9198: psql -c 'SET; ...' not working
List pgsql-bugs
Matheus de Oliveira wrote
> How if psql could handle multiple "-c" commands, something like this:
>
>     psql -c "SET statement_timetout = '3s'" -c "SELECT pg_sleep(2)"
>
> It wouldn't break existent applications and would make simpler to work on
> scripts.

I'm dubious this would be much of a realistic improvement in ease-of-use -
at least in the Linux/bash world where you are much better off constructing
some form of here-doc - and passing that in via standard input - if you need
to make use of multiple statements and usually want white-space to make
reading/maintaining those statements easier.

Not saying such an implementation wouldn't be accepted but it isn't the most
novel of ideas and it hasn't piqued anyone's interest enough to implement
thus far....

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-9198-psql-c-SET-not-working-tp5791581p5791870.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: Matheus de Oliveira
Date:
Subject: Re: BUG #9198: psql -c 'SET; ...' not working
Next
From: Tom Lane
Date:
Subject: Re: BUG #9202: C Functions crash database too easily