Re: pg_get_viewdefs() indentation considered harmful - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_get_viewdefs() indentation considered harmful
Date
Msg-id 5507.1390607657@sss.pgh.pa.us
Whole thread Raw
In response to pg_get_viewdefs() indentation considered harmful  (Greg Stark <stark@mit.edu>)
Responses Re: pg_get_viewdefs() indentation considered harmful  (Greg Stark <stark@mit.edu>)
Re: pg_get_viewdefs() indentation considered harmful  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> We're finding it more and more common for people to define partitioned
> table views with hundreds or thousands of union branches.

Really?  Given how poorly the system performs with that many inheritance
children, I've got a hard time believing either that this is common or
that ruleutils is your worst problem with it.

> pg_get_viewdefs indents each branch of the union by 8 spaces more than
> the previous branch.

I think that's because the unions are a nested binary tree so far as the
parsetree representation goes.  We could probably teach ruleutils to
flatten the display in common cases, but it might be a bit tricky to be
sure we don't create any lies about unusual nestings.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: pg_get_viewdefs() indentation considered harmful
Next
From: Greg Stark
Date:
Subject: Recovery inconsistencies, standby much larger than primary