Search Postgresql Archives

Re: Good Delimiter for copy command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 17, 2009 at 05:17:40PM +0100, Marco Colombo wrote:
> Tom Lane wrote:
> > Andrew Gould <andrewlylegould@xxxxxxxxx> 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@xxxxxxxxxx> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@xxxxxxxxx

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux