Re: pg_restore depending on user functions

From: Дмитрий Иванов <firstdismay(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore depending on user functions
Date: 2021-11-21 15:30:16
Message-ID: CAPL5KHpT1q55mbYG_Zp1HoLvC=4QxNA8LY-dB6adPK7QiFs+yQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

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(at)sss(dot)pgh(dot)pa(dot)us>:

> =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= <firstdismay(at)gmail(dot)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
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2021-11-21 23:37:32 Re: BUG #17295: Different query plan with Index Only Scan and Bitmap Index Scan.
Previous Message Juan José Santamaría Flecha 2021-11-21 09:43:33 Re: BUG #17288: PSQL bug with COPY command (Windows)

Browse pgsql-general by date

  From Date Subject
Next Message vincent.veyron@libremen.org 2021-11-21 15:46:48 Re: insert column monetary type ver 2
Previous Message Дмитрий Иванов 2021-11-21 15:23:12 Re: pg_dump insert column GENERATED