Re: data type - import problem - Mailing list pgsql-general

From Adrian Klaver
Subject Re: data type - import problem
Date
Msg-id 50CFCAEC.5020607@gmail.com
Whole thread Raw
In response to Re: data type - import problem  (Kirk Wythers <kirk.wythers@gmail.com>)
Responses Re: data type - import problem
List pgsql-general
On 12/17/2012 05:30 PM, Kirk Wythers wrote:
> Thanks.
>
> Is there a way to use the float4 data type for a variable when empty
> records contain "NA", instead of nothing? As you can see below the
> variable "A_TC_AVG1" has the first record filled with "NA" signifying
> that the record is empty? Records that contain values will have decimal
> values like 12.3456.
>

Either preprocess the data to turn NA into NULL or put the data into a
staging table that is looser about types (i.e. use varchar for this
column) and then transform in place and then move over into the final table.


--
Adrian Klaver
adrian.klaver@gmail.com


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: trouble with pg_upgrade 9.0 -> 9.1
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: [COMMITTERS] pgsql: Allow a streaming replication standby to follow a timeline switc