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

From Hadley Willan
Subject Re: Changing a column's type
Date
Msg-id 1040083446.2931.28.camel@orac
Whole thread Raw
In response to Re: Changing a column's type  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Changing a column's type
List pgsql-general
Sorry perhaps I wasn't clear.

FUNCTION fn_create_new_item()
    _seq RECORD;
begin
    SELECT INTO _seq NEXTVAL(''source_sequence'');
    ..do stuff, insert ....
    PERFORM fn_b( _seq.next_value );
end;

FUNCTION fn_do_stuff_with_new_item_id( INT )
.....


Call to fn_b breaks because _seq.next_value is of type BIGINT.





On Tue, 2002-12-17 at 12:59, Tom Lane wrote:
> Hadley Willan <hadley.willan@deeper.co.nz> writes:
> > 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.
>
> I don't follow.  You're executing functions on the columns of a sequence
> object?  Why?
>
>             regards, tom lane
--
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: Tom Lane
Date:
Subject: Re: Changing a column's type
Next
From: Jakub Ouhrabka
Date:
Subject: Re: working around setQuerySnapshot limitations in functions