Bug in ALTER COLUMN/TYPE

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Bug in ALTER COLUMN/TYPE
Date: 2004-08-04 03:36:22
Message-ID: 411059B6.5080003@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2004-08-04 03:38:48 Re: Updateable Views?
Previous Message Mike Mascari 2004-08-04 03:27:35 Re: Preliminary PITR documentation available