Re: BUG #9198: psql -c 'SET; ...' not working

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9198: psql -c 'SET; ...' not working
Date: 2014-02-13 15:59:20
Message-ID: 1392307160231-5791870.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-02-13 16:04:37 Re: BUG #9202: C Functions crash database too easily
Previous Message Matheus de Oliveira 2014-02-13 15:43:40 Re: BUG #9198: psql -c 'SET; ...' not working