Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TC35C-0008Tz-TM for pgsql-bugs@postgresql.org; Thu, 13 Sep 2012 06:39:26 +0000 Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TC359-0003HI-SR for pgsql-bugs@postgresql.org; Thu, 13 Sep 2012 06:39:26 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TC358-0005mO-4A for pgsql-bugs@postgresql.org; Thu, 13 Sep 2012 06:39:22 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1TC357-00022O-3q for pgsql-bugs@postgresql.org; Thu, 13 Sep 2012 06:39:21 +0000 Date: Thu, 13 Sep 2012 06:39:21 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7536: run arbitrary -c setup command before interaction [wishlist] To: pgsql-bugs@postgresql.org From: bugs@bereft.net X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201209/120 X-Sequence-Number: 34115 The following bug has been logged on the website: Bug reference: 7536 Logged by: Brad Bowman Email address: bugs@bereft.net PostgreSQL version: 9.1.5 Operating system: linux Description: = I'd like a -c (or -f) option that doesn't exit immediately. In my case, I'd like to setup an environment based on dynamic information (search_path, prompt, temp views, info displayed) and envisage doing it with a -c or similar. I haven't been able to find other ways to do this. PGOPTIONS and the new (9.2) PSQLRC would cover some of my needs. There is a related TODO item ( http://wiki.postgresql.org/wiki/Todo#psql ) Allow processing of multiple -f (file) options Perhaps allowing multiple -f -c and a fully interactive -f - would do psql -f setup.sql -c '..info' -f - -c '..summary' Thanks, hope this isn't just noise, Brad