Re: bcp.exe Fix Triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "yazicivo" <yazicivo(at)ttmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: bcp.exe Fix Triggers
Date: 2008-06-02 13:52:33
Message-ID: 17501.1212414753@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"yazicivo" <yazicivo(at)ttmail(dot)com> writes:
> The problem is, bcp.exe
> - Uses nothing to specify null fields, which is equivalent to
> COPY ... WITH NULL AS ''
> in PostgreSQL.

> - Uses \x00 character to specify empty strings.

Ugh. You're going to have to fix the null-char problem externally
--- perhaps run a Perl script over the dump before you import.
There's no way those triggers will work, quite aside from your
difficulties in auto-generating them, because \0 isn't valid in
PG text values.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message maria s 2008-06-02 20:40:48 function returning result set of varying column
Previous Message Joe 2008-06-02 12:36:17 Re: bcp.exe Fix Triggers