Re: psql as an execve(2) interpreter - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql as an execve(2) interpreter
Date
Msg-id 21620.1122438707@sss.pgh.pa.us
Whole thread Raw
In response to psql as an execve(2) interpreter  (<brook@biology.nmsu.edu>)
Responses Re: psql as an execve(2) interpreter
List pgsql-hackers
<brook@biology.nmsu.edu> writes:
> I would like to use pgsl as an interpreter (in the sense of
> execve(2)).  In short, if a file begins with the line

>          #! /path/to/psql -f

> it should be interpretable by psql.  The normal semantics of execve(2)
> ensure that this will work perfectly (indeed a file containing
> "#!/path/to/psql -l" works as expected), except for psql's nasty habit
> of not interpreting the first line as a comment.

Given that # is not a comment introducer in SQL, I would consider
it a bug if it did.

You should instead write a shell script that invokes psql.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RESULT_OID Bug
Next
From: Michael Fuhr
Date:
Subject: Re: RESULT_OID Bug