Changing a column's type - Mailing list pgsql-general

From Hadley Willan
Subject Changing a column's type
Date
Msg-id 1040082482.2932.12.camel@orac
Whole thread Raw
Responses Re: Changing a column's type
List 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.willan@deeper.co.nz > www.deeperdesign.com > +64(21)-28-41-463
Level 1, 4 Tamamutu St, PO Box 90, TAUPO 2730, New Zealand.



pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Error while restoring data
Next
From: Tom Lane
Date:
Subject: Re: Changing a column's type