Re: Enhancement to psql command, feedback.

2018-05-10 Thread Francisco Olarte
On Thu, May 10, 2018 at 4:46 PM, Steven Lembark wrote: > 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. Shebang is an unix-ism. It is not part of the shell. The shell just execs whatever y

Re: Enhancement to psql command, feedback.

2018-05-10 Thread Steven Lembark
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 fr

Re: Enhancement to psql command, feedback.

2018-05-09 Thread Jan Claeys
On Wed, 2018-05-09 at 08:36 -0500, John McKown wrote: > On Wed, May 9, 2018 at 3:05 AM, Pavel Stehule > wrote: > > These languages has defined # as line comment. It is not true for > > SQL. > > Thanks, that looks like a "NO" vote to me. > Not necessarily. There are other languages which don'

Re: Enhancement to psql command, feedback.

2018-05-09 Thread David G. Johnston
On Wed, May 9, 2018 at 9:04 AM, Christopher Browne wrote: > On Wed, 9 May 2018 at 04:00, John McKown > wrote: > > To me this looks similar to a UNIX shell script. Now, going sideways for > a second, if someone wanted to create a "self contained" awk script. It > would look something like: > > >

Re: Enhancement to psql command, feedback.

2018-05-09 Thread Christopher Browne
On Wed, 9 May 2018 at 04:00, John McKown wrote: > To me this looks similar to a UNIX shell script. Now, going sideways for a second, if someone wanted to create a "self contained" awk script. It would look something like: > #!/bin/awk -f > ... awk code ... I have found it convenient when Lisp im

Re: Enhancement to psql command, feedback.

2018-05-09 Thread Tom Lane
Stephen Frost writes: > Greetings, > * John McKown (john.archie.mck...@gmail.com) wrote: >> Again, this is just a discussion point. And I'm quite willing to admit >> defeat if most people don't think that it is worth the effort. > For my 2c, at least, I do think it'd be kind of neat to have, but

Re: Enhancement to psql command, feedback.

2018-05-09 Thread David G. Johnston
On Wed, May 9, 2018 at 7:17 AM, John McKown wrote: > > However, in the second case, the "magic" first line causes psql, at > present, to report an error and abort. This is why I'd like to modify how > the file referenced via the -f argument is processed. That is, the first > line of any file refe

Re: Enhancement to psql command, feedback.

2018-05-09 Thread John McKown
On Wed, May 9, 2018 at 8:52 AM, Stephen Frost wrote: > Greetings, > > * John McKown (john.archie.mck...@gmail.com) wrote: > > Again, this is just a discussion point. And I'm quite willing to admit > > defeat if most people don't think that it is worth the effort. > > For my 2c, at least, I do thi

Re: Enhancement to psql command, feedback.

2018-05-09 Thread John McKown
On Wed, May 9, 2018 at 8:56 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, May 9, 2018 at 6:44 AM, John McKown > wrote: > >> Again, this is just a discussion point. And I'm quite willing to admit >> defeat if most people don't think that it is worth the effort. >> > > ​-1, a

Re: Enhancement to psql command, feedback.

2018-05-09 Thread David G. Johnston
On Wed, May 9, 2018 at 6:44 AM, John McKown wrote: > Again, this is just a discussion point. And I'm quite willing to admit > defeat if most people don't think that it is worth the effort. > ​-1, at least per the example. I would not want "-U postgres" inside the file. I tend to rely on servic

Re: Enhancement to psql command, feedback.

2018-05-09 Thread Stephen Frost
Greetings, * John McKown (john.archie.mck...@gmail.com) wrote: > Again, this is just a discussion point. And I'm quite willing to admit > defeat if most people don't think that it is worth the effort. For my 2c, at least, I do think it'd be kind of neat to have, but we'd need a fool-proof way to

Re: Enhancement to psql command, feedback.

2018-05-09 Thread John McKown
On Wed, May 9, 2018 at 8:17 AM, Ron wrote: > On 05/09/2018 02:59 AM, John McKown wrote: > > I just wanted to throw this out to the users before I made a complete fool > of myself by formally requesting it. But I would like what I hope would be > a minor change (enhancement) to the psql command. I

Re: Enhancement to psql command, feedback.

2018-05-09 Thread John McKown
On Wed, May 9, 2018 at 3:05 AM, Pavel Stehule wrote: > > > 2018-05-09 9:59 GMT+02:00 John McKown : > >> I just wanted to throw this out to the users before I made a complete >> fool of myself by formally requesting it. But I would like what I hope >> would be a minor change (enhancement) to the p

Re: Enhancement to psql command, feedback.

2018-05-09 Thread Ron
On 05/09/2018 02:59 AM, John McKown wrote: I just wanted to throw this out to the users before I made a complete fool of myself by formally requesting it. But I would like what I hope would be a minor change (enhancement) to the psql command. If you look on this page, https://wiki.postgresql.or

Re: Enhancement to psql command, feedback.

2018-05-09 Thread Matt Zagrabelny
On Wed, May 9, 2018 at 3:05 AM, Pavel Stehule wrote: > > > 2018-05-09 9:59 GMT+02:00 John McKown : > >> I just wanted to throw this out to the users before I made a complete >> fool of myself by formally requesting it. But I would like what I hope >> would be a minor change (enhancement) to the p

Re: Enhancement to psql command, feedback.

2018-05-09 Thread Pavel Stehule
2018-05-09 9:59 GMT+02:00 John McKown : > I just wanted to throw this out to the users before I made a complete fool > of myself by formally requesting it. But I would like what I hope would be > a minor change (enhancement) to the psql command. If you look on this page, > https://wiki.postgresql.

Enhancement to psql command, feedback.

2018-05-09 Thread John McKown
I just wanted to throw this out to the users before I made a complete fool of myself by formally requesting it. But I would like what I hope would be a minor change (enhancement) to the psql command. If you look on this page, https://wiki.postgresql.org/wiki/Shared_Database_Hosting , you will see a