Re: (Mis?)Behavior of \copy with -f and \i

Поиск
Список
Период
Сортировка
От Mark Feit
Тема Re: (Mis?)Behavior of \copy with -f and \i
Дата
Msg-id 16376.51810.33992.248263@gargle.gargle.HOWL
обсуждение исходный текст
Ответ на Re: (Mis?)Behavior of \copy with -f and \i  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut writes:>> [Patch to make psql's \copy read from the current input, not just>  the standard input or a
file.]>> I'm not sure about the proposed syntax, but the feature sounds quite > reasonable.
 

I have a patch written for this that uses the "-" syntax:
   \copy junk (abbrev, name) FROM - WITH DELIMITER '|' NULL ''

I considered a half-dozen or so different ways to go about it, and
this one fits in without breaking anything that already exists.  The
hyphen seems like the best choice to go with STDIN and STDOUT since
there are already other programs where it implies the default input
stream and it's not something likely to be found alone as a filename.
If you find something you like better, changing it to something else
is a matter of tweaking a string in copy.c.

The patch will be posted to pgsql-patches as soon as I've had a chance
to torture it some more.
                        - Mark
-- 
"Debugging is twice as hard as writing the code in the firstplace. Therefore, if you write the code as cleverly as
possible,youare, by definition, not smart enough to debug it."  -- Brian  Kernighan
 


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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Remote Procedures
Следующее
От: A E
Дата:
Сообщение: Re: Anything akin to an Evaluate Statement in Postgresql?