Re: Cast char to number - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Cast char to number
Date
Msg-id 4B859E54.9090502@iol.ie
Whole thread Raw
In response to Re: Cast char to number  (Christine Penner <christine@ingenioussoftware.com>)
Responses Re: Cast char to number  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-general
On 24/02/2010 21:42, Christine Penner wrote:
> This is what I did.
>
> set all blank columns to '0' because they were causing errors.
> alter table T alter column a type integer using a::integer
>
> That worked perfectly.

Glad you got sorted.

Bill's advice upthread is worth taking on board - if you're in a
position to do so, make sure that numbers are stored as numbers rather
than text, and you'll save yourself all sorts of wacky grief.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Curious plperl behavior
Next
From: Bill Moran
Date:
Subject: Re: Cast char to number