Changing a column's type

From: Hadley Willan <hadley(dot)willan(at)deeper(dot)co(dot)nz>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Changing a column's type
Date: 2002-12-16 23:48:02
Message-ID: 1040082482.2932.12.camel@orac
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,
I was using 7.2 and my sequences had a column type of int. I didn't
think much of this until I recently built the RPMs for 7.3 and
"upgraded". i.e. dumped out and imported again. I not that it had all
gone okay until I called a function that was working in 7.2 that is now
broken in 7.3

Reason being is that the column type for the sequence values is now
bigInt and of course I foolishly have a number of functions defined as
taking an INT. So of course the function bails because it can't find a
definition for a function matching bigint.

Anyway, to cut a long story short I was wondering if it is possible to
change the existing type of the sequence columns back to Int or recreate
the sequence with a type of int4.....

And yes, I should probably fix my functions to work with the bigInt
type, but I'm also curious to know if this is possible.

Thanks.
--
Hadley Willan > Systems Development > Deeper Design Limited. +64(7)377-3328
hadley(dot)willan(at)deeper(dot)co(dot)nz > www.deeperdesign.com > +64(21)-28-41-463
Level 1, 4 Tamamutu St, PO Box 90, TAUPO 2730, New Zealand.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-12-16 23:59:50 Re: Changing a column's type
Previous Message Peter Eisentraut 2002-12-16 23:46:16 Re: Error while restoring data