From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | bug? Drop column and SQL functions |
Date: | 2003-10-28 18:28:26 |
Message-ID: | 20031028182826.GD3664@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Someone showed me this simple example:
regression=# CREATE TABLE test (a TEXT, b TEXT);
CREATE TABLE
regression=# INSERT INTO test VALUES ('foo', 'bar');
INSERT 17145 1
regression=# CREATE FUNCTION foo() RETURNS SETOF test as 'SELECT * FROM test' LANGUAGE sql;
CREATE FUNCTION
regression=# SELECT * FROM foo();
a | b
-----+-----
foo | bar
(1 registro)
regression=# ALTER TABLE test DROP COLUMN a;
ALTER TABLE
regression=# SELECT * FROM foo();
ERROR: query-specified return row and actual function return row do not match
(note that I didn't "specify a return record" -- SETOF test should only
consider non-dropped columns ...)
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La virtud es el justo medio entre dos defectos" (Aristóteles)
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2003-10-28 18:51:57 | Re: Open items |
Previous Message | Eric Soroos | 2003-10-28 18:20:06 | Re: shared memory on OS X - 7.4beta4 |