On Tue, Feb 17, 2009 at 05:17:40PM +0100, Marco Colombo wrote:
> Tom Lane wrote:
> > Andrew Gould <andrewlylegould@gmail.com> writes:
> >> To the list: Does pg_dump escape characters that are the same as the
> >> delimiter?
> >
> > Yes. The OP has not actually explained why he needs to pick a
> > nondefault delimiter, unless maybe it is that he wants to feed the
> > dump to some program that is too dumb to deal with escaping.
> >
> > regards, tom lane
> >
>
> Which makes me wonder, does copy accept UTF-8 input?
Yes, but...
> Is it possibile to use some unicode character which is unlikely to
> appear in the data set as delimiter? Something like U+FFFC.
No. The delimiter needs to be one byte long at the moment. The error
message you're getting probably needs an update. Bug?
> $ psql -c "\copy test from '2.txt' delimiter ●"
> ERROR: COPY delimiter must be a single character
> \copy: ERROR: COPY delimiter must be a single character
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate