Search Postgresql Archives

Re: COPY FROM file with zero-delimited fields

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

 



On Apr 11, 7:42 pm, mmonc...@xxxxxxxxx ("Merlin Moncure") wrote:
> On 11 Apr 2007 00:25:50 -0700, eugene.mind...@xxxxxxxxx
>
> <eugene.mind...@xxxxxxxxx> wrote:
> > Hi all,
> > I wonder if there's a way to use COPY FROM command when dealing with a
> > data file containing records whose fields are delimited with zero-
> > byte? Or I'd better change the delimiter? :)
>
> you can always run it through tr or similar tools first.
>
> merlin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org/

Yes, sure, I know that, but the matter is - the fields are mostly
textual ones, and can hold just about any text, so it's hard to choose
a right delimiter for fields, you know ;) I though I'd eliminate the
problem by using zero-byte for a field delimiter, but apparently COPY
FROM accepts only "printable" symbols as delimiters...
Another solution would be to escape potential delimiter everywhere in
the text fields, but that also requires using external tools... I had
a hope that COPY FROM can be persuaded to use some non-printable
character in its WITH DELIMITER clause, but apparently this is not the
case...



[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