Re: Enhancement to psql command, feedback. - Mailing list pgsql-general

From Steven Lembark
Subject Re: Enhancement to psql command, feedback.
Date
Msg-id 20180510094640.29cd4d76@wrkhors.com
Whole thread Raw
In response to Re: Enhancement to psql command, feedback.  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Enhancement to psql command, feedback.
List pgsql-general
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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is there any C functions that convert the entry to string?
Next
From: Steven Lembark
Date:
Subject: Selecting strict, immutable text for a composite type.