BUG #17376: Adding unique column with a function() default results in "could not read block 0 in file" error
В списке pgsql-bugs по дате отправления:
| От | PG Bug reporting form |
|---|---|
| Тема | BUG #17376: Adding unique column with a function() default results in "could not read block 0 in file" error |
| Дата | |
| Msg-id | 17376-07b867ccc817828f@postgresql.org обсуждение исходный текст |
| Ответы |
Re: BUG #17376: Adding unique column with a function() default results in "could not read block 0 in file" error
Re: BUG #17376: Adding unique column with a function() default results in "could not read block 0 in file" error |
| Список | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 17376
Logged by: akg
Email address: adrien.gilmore+pg@gmail.com
PostgreSQL version: 13.5
Operating system: Linux
Description:
Hello,
SQL demonstrating the issue on 13.5 is below.
--
BEGIN;
CREATE TABLE t1 (id SERIAL PRIMARY KEY);
INSERT INTO t1 VALUES (default);
CREATE FUNCTION myfunc() RETURNS TEXT LANGUAGE plpgsql AS $$
BEGIN
SELECT r FROM t1;
RETURN random()::text;
END $$;
ALTER TABLE t1 ADD COLUMN r TEXT NOT NULL UNIQUE DEFAULT myfunc();
--
Results in the error:
ERROR: could not read block 0 in file "base/84505/84705": read only 0 of
8192 bytes
The error message content returned is what I suspect of being a bug, not so
much that this SQL didn't work.
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера