Re: Looking for postgres equivalent of mysqlimport

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: "M(dot) Bastin" <marcbastin(at)mindspring(dot)com>
Cc: Postgres <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Looking for postgres equivalent of mysqlimport
Date: 2004-09-17 18:07:22
Message-ID: 6C56A02D-08D4-11D9-B5A4-000A95D7BA10@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Marc,

I hadn't noticed that for that table I left out the with NULL AS
'NULL'. That did fix the problem. I appreciate the help. I now have
a completed database from mysql!

Sean

On Sep 17, 2004, at 12:37 PM, M. Bastin wrote:

> At 12:31 PM -0400 9/17/04, Sean Davis wrote:
>> Marc,
>>
>> That seemed to get most of the way (setting to NULL). However, it
>> seems that does not work for integer columns? I'm still getting an
>> error:
>>
>> ERROR: invalid input syntax for integer: "NULL"
>> CONTEXT: COPY cgap_lib,line 1, column clones: "NULL"
>
> Your text columns will probably have imported the text "NULL."
>
> From http://www.postgresql.org/docs/7.4/interactive/sql-copy.html
>
> "null string
>
> The string that represents a null value. The default is \N
> (backslash-N). You might prefer an empty string, for example."
>
> You can choose your own null string with:
> [ NULL [ AS ] 'null string' ] ]
>
> Marc

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Alexander Jochum 2004-09-17 18:41:58 Re: Installation problem...
Previous Message M. Bastin 2004-09-17 16:37:35 Re: Looking for postgres equivalent of mysqlimport