Re: pg_get_viewdef 7.4 et al - Mailing list pgsql-hackers

From Andreas Pflug
Subject Re: pg_get_viewdef 7.4 et al
Date
Msg-id 3E93E53B.4040306@web.de
Whole thread Raw
In response to Re: pg_get_viewdef 7.4 et al  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

>I believe the proposed patch breaks many nontrivial cases (though it's
>quite hard to be sure exactly what it does, given a non-contextual diff
>:-(). 
>
Hi Tom,
it was a cvs diff, should I upload the whole source?

> Have you tried running its output back into the system to see
>whether the querytree is reconstructed exactly?  Don't forget to try
>cases where parentheses were used in the original source to force a
>non-default evaluation order.
>  
>

I'm quite sure about JOINS, T_BoolExpr and T_OpExpr. I had a lot of view 
definitions fed in and out, to see if things work as expected.
I wasn't able to force a T_CoerceToDomain, and only got T_RelabelType 
with simple variables. If you can tell me how to force complex args for 
these cases, I'll check this. As far as I understand, both types always 
have only one arg. If this is wrong, there definitely has to be an 
additional check for a simple variable arg.

Regards,
Andreas



pgsql-hackers by date:

Previous
From: "Ron Peacetree"
Date:
Subject: Re: Anyone working on better transaction locking?
Next
From: "Al Sutton"
Date:
Subject: RedHat 9 & 7.2.4