pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #9198: psql -c 'SET; ...' not working
Date: Thu, 13 Feb 2014 07:59:20 -0800 (PST)
Message-ID: <1392307160231-5791870.post@n5.nabble.com> (raw)
In-Reply-To: <CAJghg4Lo5t8jab6NnrLOnM9A2LNH_zajD_7TegiPCSvSGdqUDA@mail.gmail.com>
References: <20140212125626.2710.94912@wrigleys.postgresql.org>
	<25094.1392219652@sss.pgh.pa.us>
	<CAJghg4Lo5t8jab6NnrLOnM9A2LNH_zajD_7TegiPCSvSGdqUDA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (9+ messages)  latest in thread

Message-ID: <1392307160231-5791870.post@n5.nabble.com>
Permalink:  ../1392307160231-5791870.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1392307160231-5791870.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: polobo@yahoo.com
  Subject: Re: BUG #9198: psql -c 'SET; ...' not working
  In-Reply-To: <1392307160231-5791870.post@n5.nabble.com>
  References: <20140212125626.2710.94912@wrigleys.postgresql.org> <25094.1392219652@sss.pgh.pa.us> <CAJghg4Lo5t8jab6NnrLOnM9A2LNH_zajD_7TegiPCSvSGdqUDA@mail.gmail.com> <1392307160231-5791870.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox