Re: pg_restore depending on user functions
От | Дмитрий Иванов |
---|---|
Тема | Re: pg_restore depending on user functions |
Дата | |
Msg-id | CAPL5KHpT1q55mbYG_Zp1HoLvC=4QxNA8LY-dB6adPK7QiFs+yQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pg_restore depending on user functions (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
Ok.
I have a very general idea of how to do it. I'm afraid I won't be able to do it immediately, I'm looking into it. But when there is an update I will definitely check and let you know.
вс, 21 нояб. 2021 г. в 01:25, Tom Lane <tgl@sss.pgh.pa.us>:
Дмитрий Иванов <firstdismay@gmail.com> writes:
> I hope this helps you.
Okay, that's better.
The problem seems to be that the view using the cast is itself depended
on (indirectly through another view) by another function a_ext_by_id(),
which is using the intermediate view's rowtype as its output type.
So that causes the dependency sort to hoist those two views above the
function a_ext_by_id(), and now they're ahead of the cast, which is
just left at its initial priority-driven location.
I think we can fix this by adjusting the sort priority order as per
the attached patch. This fixes this toy test case anyway. Can you
check to see if it fixes your real database?
(Note that as given, the patch will only apply to v14 not earlier
branches.)
regards, tom lane
В списке pgsql-bugs по дате отправления: