Re: Petition: Treat #!... shebangs as comments

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Petition: Treat #!... shebangs as comments
Date: 2014-07-18 17:41:30
Message-ID: 1405705290003-5811987.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank Pinto wrote
> I personally like Francisco Olarte's approach. Hashbang's don't support
> arguments well (
> http://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-with-a-shebang-i-e)
> and being able to put JUST psql as the command to execute the script
> doesn't scale across environments. Previously I've just used a quick
> wrapper:
>
> https://gist.github.com/frankpinto/3427cf769a72ef25ffac
>
> It can be modified to accept arguments for the script name, run a sql
> script by the same name, have a default environment, etc.
>
> Frank

While I agree with the sentiment unless someone can present a reason why
allowing and then ignoring a she-bang is a terrible idea then this seems
like a case for letting end-users decide what is best for themselves. The
issue then is that apparently this isn't exactly high on anyone's list of
ToDo items so unless the OP or one of the +1 people are willing to supply a
patch the odds that it gets done decreases quite quickly.

As an aside - putting an "sql" extension onto a file that uses psql commands
and features seems wrong...

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Petition-Treat-shebangs-as-comments-tp5811962p5811987.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergiy Zuban 2014-07-18 18:38:56 postgres_fdw - IS TRUE/FALSE conditions are not pushed down
Previous Message Frank Pinto 2014-07-18 17:25:20 Re: Petition: Treat #!... shebangs as comments