Re: BUG #18038: Aliases removed from view definitions - Mailing list pgsql-bugs

From Asier Lostalé
Subject Re: BUG #18038: Aliases removed from view definitions
Date
Msg-id CABtr+CL=_vQ4o_mFH=pS10Zag2XNa9w6Z8neWnMu9_gyGXgRWQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18038: Aliases removed from view definitions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #18038: Aliases removed from view definitions
Re: BUG #18038: Aliases removed from view definitions
List 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

pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: Question about double table scans for a table
Next
From: jian he
Date:
Subject: Re: Question about double table scans for a table