Re: BUG #18151: pg_upgradecluster fails when column default refers to column
От | Liam Morland |
---|---|
Тема | Re: BUG #18151: pg_upgradecluster fails when column default refers to column |
Дата | |
Msg-id | 20231009161305.af4z3fz3cfgo2gwl@burns.morland.ca обсуждение исходный текст |
Ответ на | Re: BUG #18151: pg_upgradecluster fails when column default refers to column (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #18151: pg_upgradecluster fails when column default refers to column
|
Список | pgsql-bugs |
2023-10-09 10:11-0400 Tom Lane <tgl@sss.pgh.pa.us> wrote: [...] >Is that function written in old-style (with a string literal for the >body) or new-style with BEGIN ATOMIC? [...] It is old-style. I wrote it before PG 14. >Can you show us the exact DDL definition of both the table and the >function? [...] From the output of pg_dump: CREATE FUNCTION public.event_id_nextval() RETURNS integer LANGUAGE sql AS $$ SELECT COALESCE(MAX(event_id) + 1, 1) FROM event; $$; CREATE TABLE public.event ( event_id integer DEFAULT public.event_id_nextval() NOT NULL, date_start date NOT NULL, date_end date NOT NULL, title text NOT NULL, CONSTRAINT date_end_gt_date_start CHECK ((date_end >= date_start)) ); ALTER TABLE ONLY public.event ADD CONSTRAINT event_pkey PRIMARY KEY (event_id); Regards, Liam
В списке pgsql-bugs по дате отправления: