Re: Extending COPY TO - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Extending COPY TO
Date
Msg-id 542118E6.1050504@vmware.com
Whole thread Raw
In response to Extending COPY TO  (Andrea Riciputi <andrea.riciputi@gmail.com>)
List pgsql-hackers
On 09/23/2014 09:49 AM, Andrea Riciputi wrote:
> My idea was to extend the COPY TO command to accept an EOL option as
> it already does with the DELIMITER option. To keep it simple we can
> limit the EOL choice to CR, LF or CRLF to avoid unusual output, and
> also keep the current behaviour when no EOL option is given. I was
> also wondering if an EOL option could be useful also for the text
> output format or not.

I don't think we want to go down that path. There are plenty of options 
in COPY already, and the more you add, the more complicated it gets. And 
we're never going to be able to satisfy everyone's needs.

I'd suggest doing:

COPY table TO PROGRAM 'unix2dos > /tmp/file'

- Heikki



pgsql-hackers by date:

Previous
From: Andrea Riciputi
Date:
Subject: Extending COPY TO
Next
From: Stephen Frost
Date:
Subject: Re: Extending COPY TO