Re: Adding Missing Data to a Table [SOLVED]

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: Postgresql PDX_Users <pdxpug(at)postgresql(dot)org>
Subject: Re: Adding Missing Data to a Table [SOLVED]
Date: 2011-04-01 15:31:19
Message-ID: alpine.LNX.2.00.1104010828400.3160@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug

On Tue, 29 Mar 2011, Roderick A. Anderson wrote:

> A CAST should handle getting the data from the tmp_col back into record.
> The serial was a simple way to get the column incrementally filled.

Actually, CAST does not work from char/varchar to int, bigint, or numeric;
at least, it would not here with 9.0.3 up and running. Shrug.

I created a new column of type bigint, copied values from column record to
the new one, dropped the varchar column, and renamed the bigint column. Then
added a sequence and used that to add values to rows without them.

All's good now.

Thanks to everyone and especially Michael,

Rich

In response to

Browse pdxpug by date

  From Date Subject
Next Message Rich Shepard 2011-04-05 17:45:24 Postgres-9.x and ADOBD
Previous Message Rich Shepard 2011-03-30 12:47:53 Re: Adding Missing Data to a Table