Re: BUG #18038: Aliases removed from view definitions

From: Asier Lostalé <asier(dot)lostale(at)openbravo(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: BUG #18038: Aliases removed from view definitions
Date: 2023-07-28 05:33:51
Message-ID: CABtr+CL=_vQ4o_mFH=pS10Zag2XNa9w6Z8neWnMu9_gyGXgRWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tom,

Thank you for your quick response.

> In our case this is problematic as in our application we export view
> > definitions to text files to later import them, we support different
> > PostgreSQL versions and we would need to keep stable SQL among different
> > version (export <-> import).
>
> I'm afraid your application has been built on sand. We change
> insignificant details of view/rule decompiling all the time,
> and are not likely to stop. I might have more sympathy for
> your request if it didn't imply putting ruleutils.c into an
> impossible straitjacket for all time to come.
>

Strangely we've been lucky for the last pile of years, we always found a
way to get a sql that looked the same in all the versions.

Nevertheless I understand it is very fragile. Is there any way to get the
original sql text used to create the view?

Regards,

Asier

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jian he 2023-07-28 05:34:07 Re: Question about double table scans for a table
Previous Message David Rowley 2023-07-28 04:01:34 Re: Question about double table scans for a table