Re: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types
Date
Msg-id 852982.1772205703@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types
List pgsql-bugs
Richard Guo <guofenglinux@gmail.com> writes:
> I am on the fence about whether this fix is safe to back-patch to v18.

I don't think we have a lot of choice.  The cases where it makes a
difference are pretty broken.  Fortunately, I think these cases
are rare.  JOIN USING combining two different-type columns has got
to be an edge-case usage, and I think it likely doesn't matter much
in other cases.

> However, this fix will only apply to newly created views.  Users who
> have existing views affected by this bug will have to recreate them
> after upgrading to get the corrected pg_get_viewdef output.

Yeah :-(.  What's really annoying is that probably people will not
notice until they try to upgrade to v19, and by then recreating
the view correctly might be difficult.  But I'm not seeing a way
to smooth their path.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Agnieszka Chodkowska-Gyurics
Date:
Subject: Re: BUG #19420: Zombie FK exists after partition is detached.
Next
From: Tom Lane
Date:
Subject: Re: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types