Re: [PATCHES] Current-stream read for psql's \copy

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [PATCHES] Current-stream read for psql's \copy
Дата
Msg-id 200402102141.i1ALf3E22737@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Current-stream read for psql's \copy  (Andrew Sullivan <ajs@crankycanuck.ca>)
Список pgsql-hackers
Andrew Sullivan wrote:
> On Tue, Feb 10, 2004 at 12:33:10PM -0500, Bruce Momjian wrote:
> > 
> > What do people want to do with the current \copy behavior for stdin? 
> 
> I'd like to hear more discussion of Tom's argument about security
> before the decision is taken.

Tom's point is that you can feed SQL to psql via -f and have \copy input
come from psql's stdin, and you can't insert SQL into psql's stdin:
prog | psql -f commands.sql test

If commands.sql contains \copy, you can only specify copy data in
'prog', not actual SQL commands.  If you want to mix SQL commands and
\copy data in the same file, you have to use:
psql test < commands.sql

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: MS SQL features for new version
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Current-stream read for psql's \copy