bug? Drop column and SQL functions
| От | Alvaro Herrera |
|---|---|
| Тема | bug? Drop column and SQL functions |
| Дата | |
| Msg-id | 20031028182826.GD3664@dcc.uchile.cl обсуждение исходный текст |
| Ответы |
RES: bug? Drop column and SQL functions
|
| Список | 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)
В списке pgsql-hackers по дате отправления: