pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steven Lembark <lembark@wrkhors.com>
To: pgsql-general@lists.postgresql.org
Cc: lembark@wrkhors.com
Subject: Re: Enhancement to psql command, feedback.
Date: Thu, 10 May 2018 09:46:40 -0500
Message-ID: <20180510094640.29cd4d76@wrkhors.com> (raw)
In-Reply-To: <090b3dc0-b817-0368-c437-ef85d20cb67d@gmail.com>
References: <CAAJSdji027Pjd2QN-t5HP=sB_YgHP=X-SGbUaXy8A+mUPg_buw@mail.gmail.com>
	<090b3dc0-b817-0368-c437-ef85d20cb67d@gmail.com>


The whole point of "#!" working in shell is that the two-bytes
(a) mark the file as executable by a specific shell command and 
(b) are a shell comment.

One fairly simple fix that would make annotating here scripts
and the like simpler for shell(ish) execution would be simply
ignoring all text from "\n#" to the first "\n", which would 
allow the #! to function as a comment -- just as it does in
the shell. 

Another way to do it would be adding a '#' command to psql,
similar to '\', that accepts a one-line directive and ignores
it entirely. This would use the existing framework for detecting
the context of '\' as a command, just with a different magic
char.


-- 
Steven Lembark                                       1505 National Ave
Workhorse Computing                                 Rockford, IL 61103
lembark@wrkhors.com                                    +1 888 359 3508




view thread (17+ messages)  latest in thread

Message-ID: <20180510094640.29cd4d76@wrkhors.com>
Permalink:  ../20180510094640.29cd4d76@wrkhors.com/
Also on:    postgresql.org/message-id/20180510094640.29cd4d76@wrkhors.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-general@postgresql.org
  Cc: lembark@wrkhors.com
  Subject: Re: Enhancement to psql command, feedback.
  In-Reply-To: <20180510094640.29cd4d76@wrkhors.com>
  References: <CAAJSdji027Pjd2QN-t5HP=sB_YgHP=X-SGbUaXy8A+mUPg_buw@mail.gmail.com> <090b3dc0-b817-0368-c437-ef85d20cb67d@gmail.com> <20180510094640.29cd4d76@wrkhors.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