Re: RULE regression test fragility?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RULE regression test fragility?
Date: 2013-10-26 16:02:18
Message-ID: 20131026160218.GA5279@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-10-26 11:27:19 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > [ patch for \a\t mode in rules and sanity_check output ]
>
> Committed with some minor adjustment of the comments.

Thanks.

> >> +1 (but what are those silly parens in pg_seclabels definition?),
>
> > That's because it contain several UNION ALLs and ruleutils makes sure
> > the order is correct.
>
> That looks weird to me too, but it's surely not the fault of this patch.
> Maybe we should take a look at exactly what ruleutils is doing there.

Imo what it does looks sane - it adds parentheses whenever a child of a
set operation is a set operation again to make sure the order in which
the generated set operations are parsed/interpreted stays the same.

Now, we could probably remove that in some more cases (left is SetOp but
doesn't have an ORDER BY/LIMIT/...), but it's hard enough to figure out
when that's safe that I wouldn't bother.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-10-26 16:25:40 Re: RULE regression test fragility?
Previous Message Tom Lane 2013-10-26 15:27:19 Re: RULE regression test fragility?