Alvaro Herrera <[EMAIL PROTECTED]> writes:
> I was under the impression that I could start a "psql -f pipe" and then
> feed it commands through the pipe using echo, and expect it to hang from
> one command to the next.  Of course, this doesn't work -- my guess is
> that echo sends an EOF after the line I send, so psql sees the EOF in
> the pipe and terminates.

Right.  You need some (other?) process holding the write end of the pipe
open continuously until you're done with the session.

There isn't really any such concept as "sending an EOF" here.  The read
side of the pipe reports EOF if there are no processes holding the write
side open.  More data could be sent by a new writer, but of course psql
has no idea about that.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to