Re: pg_get_viewdefs() indentation considered harmful

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pg_get_viewdefs() indentation considered harmful
Дата
Msg-id CA+TgmoYX=KSZ1gBNC1QMq1h8N3OEqBV=ykqXOpogrzr2pcUkfQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_get_viewdefs() indentation considered harmful  (Greg Stark <stark@mit.edu>)
Ответы Re: pg_get_viewdefs() indentation considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jan 24, 2014 at 8:53 PM, Greg Stark <stark@mit.edu> wrote:
> On Fri, Jan 24, 2014 at 8:49 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Fri, Jan 24, 2014 at 6:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> 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.
>>
>> Doesn't make it a bad idea to fix it.  You may need hundreds or
>> thousands of union branches for this to totally break the world, but
>> you only need about five for it to be annoying.
>
> Indeed even aside from the performance questions, once you're indented
> 5-10 times the indention stops being useful at all. The query would
> probably be even more readable if we just made indentation modulo 40
> so once you get too far indented it "wraps around" which is not unlike
> how humans actually indent things in this case.

Ha!  That seems a little crazy, but *capping* the indentation at some
reasonable value might not be dumb.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: extension_control_path
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)