Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDyhD-0000sG-LS for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Feb 2014 15:59:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WDyhD-00088t-2f for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Feb 2014 15:59:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDyhB-00087b-JJ for pgsql-bugs@postgresql.org; Thu, 13 Feb 2014 15:59:25 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDyh8-0003ll-4E for pgsql-bugs@postgresql.org; Thu, 13 Feb 2014 15:59:25 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WDyh6-0002OD-8F for pgsql-bugs@postgresql.org; Thu, 13 Feb 2014 07:59:20 -0800 Date: Thu, 13 Feb 2014 07:59:20 -0800 (PST) From: David Johnston To: pgsql-bugs@postgresql.org Message-ID: <1392307160231-5791870.post@n5.nabble.com> In-Reply-To: References: <20140212125626.2710.94912@wrigleys.postgresql.org> <25094.1392219652@sss.pgh.pa.us> Subject: Re: BUG #9198: psql -c 'SET; ...' not working MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 1.8 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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