Bug in functions returning setof where table has dropped column
В списке pgsql-bugs по дате отправления:
| От | Stephen Quinney |
|---|---|
| Тема | Bug in functions returning setof where table has dropped column |
| Дата | |
| Msg-id | 20040112101533.GA24897@computing-services.oxford.ac.uk обсуждение |
| Список | pgsql-bugs |
I originally sent to this to the pgsql-general mailing list as I was not sure if this was a bug or not. It seems likely that it is so I am sending it on to here. I create a table called wibble: CREATE TABLE wibble (a integer, b integer); I insert some data: INSERT INTO wibble VALUES (1,1); I decide that actually I want column b to be a BIGINT, so I do: ALTER TABLE wibble ADD COLUMN c BIGINT; UPDATE wibble SET c = b; ALTER TABLE wibble DROP COLUMN b; ALTER TABLE wibble RENAME c TO b; I have written a function which shows fairly simply my problem. CREATE FUNCTION foobar() RETURNS SETOF wibble AS 'SELECT * FROM wibble' LANGUAGE SQL; Doing 'select * from foobar();' gives me the error: ERROR: query-specified return row and actual function return row do not match I have tested it on other tables where I have not messed around with any columns like this and it does not occur for them. I am using postgresql 7.4.1 on Debian sid/unstable (i386). Thanks in advance, Stephen Quinney
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера