Re: Extending COPY TO - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Extending COPY TO
Date
Msg-id 20140923065619.GU16422@tamriel.snowman.net
Whole thread Raw
In response to Extending COPY TO  (Andrea Riciputi <andrea.riciputi@gmail.com>)
Responses Re: Extending COPY TO
List pgsql-hackers
Andrea,

* Andrea Riciputi (andrea.riciputi@gmail.com) wrote:
> My idea was to extend the COPY TO command to accept an EOL option as it already does with the DELIMITER option. To
keepit simple we can limit the EOL choice to CR, LF or CRLF to avoid unusual output, and also keep the current
behaviourwhen no EOL option is given. I was also wondering if an EOL option could be useful also for the text output
formator not.
 

Have you considered using COPY TO's 'PROGRAM' option to simply pipe the
output through unix2dos..?

> I spent the weekend reading the COPY command source code and its grammar definition and I think I can patch it by
myself,submit the patch here and wait for your review. However before starting this in my spare time I wanted to know
ifyou, as the PG hackers community, would be against a similar proposal for any reason, and if so why.
 

I'm not particularly against it, though if it can be solved with the
existing 'PROGRAM' capability then it may not make sense to complicate
the COPY code further.
Thanks!
    Stephen

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Extending COPY TO
Next
From: Stephen Frost
Date:
Subject: superuser() shortcuts