Re: [PATCHES] Current-stream read for psql's \copy
| От | Tom Lane |
|---|---|
| Тема | Re: [PATCHES] Current-stream read for psql's \copy |
| Дата | |
| Msg-id | 14669.1076425822@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [PATCHES] Current-stream read for psql's \copy (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Ответы |
Re: [PATCHES] Current-stream read for psql's \copy
|
| Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> 'psql test </tmp/x' works fine, but 'psql -f /tmp/x test' hangs waiting
> for input from stdin. Why would we want STDIN to read from the terminal
> if all commands are being read from a file with -f?
Actually, that behavior is extremely useful. Considerprogram-that-generates-data | psql -f somescript
The script can issue a COPY FROM STDIN to insert the data coming through
the pipe.
> I propose we just fix this and document it in the release notes.
I propose we not break existing applications. If we change it the way
you suggest, there'll be no way to do the above.
regards, tom lane
В списке pgsql-hackers по дате отправления: