| From: | Steven Lembark <lembark(at)wrkhors(dot)com> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Cc: | lembark(at)wrkhors(dot)com |
| Subject: | Re: Enhancement to psql command, feedback. |
| Date: | 2018-05-10 14:46:40 |
| Message-ID: | 20180510094640.29cd4d76@wrkhors.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)wrkhors(dot)com +1 888 359 3508
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steven Lembark | 2018-05-10 15:30:41 | Selecting strict, immutable text for a composite type. |
| Previous Message | Tom Lane | 2018-05-10 14:37:51 | Re: Is there any C functions that convert the entry to string? |