Bug in ALTER COLUMN/TYPE - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Bug in ALTER COLUMN/TYPE
Date
Msg-id 411059B6.5080003@familyhealth.com.au
Whole thread Raw
Responses Re: Bug in ALTER COLUMN/TYPE
Re: Bug in ALTER COLUMN/TYPE
List pgsql-hackers
I think we need to deny changing column types if a function is using the 
table type as a return set.

test=# create table test (a int4);
CREATE TABLE
test=# create function test () returns setof test as 'select 1' language 
sql;
CREATE FUNCTION
test=# alter table test alter a type bigint;
ALTER TABLE
test=# select * from test();
ERROR:  return type mismatch in function declared to return test
DETAIL:  Final SELECT returns integer instead of bigint at column 1.
CONTEXT:  SQL function "test" during startup

Chris



pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: Re: Preliminary PITR documentation available
Next
From: Oliver Jowett
Date:
Subject: Re: [JDBC] Very strange Error in Updates