Re: - Mailing list pgsql-general

From Bruno Wolff III
Subject Re:
Date
Msg-id 20030821024813.GC24904@wolff.to
Whole thread Raw
In response to  (<zoop@lone.ath.cx>)
List pgsql-general
On Wed, Aug 20, 2003 at 20:59:43 -0000,
  zoop@lone.ath.cx wrote:
> I upgraded to 7.3.3 from 7.2 something.  I guess the insert statment no longer
> accepts a zero lenght string like ''
> ERROR:  pg_atoi: zero-length string
>
> Is there a way to make this work so it will put Null in the place of it?

Note that previously empty strings were treated as zero, not null (unlike
when using Oracle) when used for numeric values.

It is hard to give you concrete advice without knowing more about how
the data is collected. But having the application emit NULL or '0' (depending
on which you want) instead of '' is probably the way you want to go (if you
can). If you are using COPY, then there is a way to say that the empty
string represents a NULL.

pgsql-general by date:

Previous
From: expect
Date:
Subject: Re: 7.4b1 vs 7.3.4 performance
Next
From: Bruno Wolff III
Date:
Subject: Re: query optimization: aggregate and distinct