Re: [HACKERS] pg_class.relpartbound definition overly brittle

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] pg_class.relpartbound definition overly brittle
Дата
Msg-id 26508.1496422785@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] pg_class.relpartbound definition overly brittle  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] pg_class.relpartbound definition overly brittle  (Mark Dilger <hornschnorter@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Also, you're attacking a straw man. Accidentally storing a meaningless
> parse location in the catalog isn't a feature, and we shouldn't
> pretend otherwise.

It's not meaningless, and it is a feature, useful for debugging.
Otherwise you'd have a hard time telling one occurrence of e.g. "+" from
another when you're trying to make sense of a stored tree.  We worked out
all this behavior ages ago for other expression node trees that are stored
in the catalogs (default expressions, index expressions, check
constraints, etc etc) and I don't see a reason for partition expressions
to be different.

I agree that this means you can't just strcmp a couple of stored node tree
strings to decide if they're equal, but you couldn't anyway --- a moment's
perusal of equalfuncs.c will show you other special cases, each with their
own rationale.  Maybe you'd like to complain that every one of those
rationales is wrongheaded but I do not think you will get far.

I think the best advice for Mark is to look at pg_get_expr() output and
see if that matches.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Questions about upgrade standby with rsync
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] proposal: PLpgSQL parallel assignemnt