Re: [HACKERS] pg_class.relpartbound definition overly brittle

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] pg_class.relpartbound definition overly brittle
Дата
Msg-id 20170531214938.n7oahwvz5qn7vugq@alvherre.pgsql
обсуждение исходный текст
Ответ на [HACKERS] pg_class.relpartbound definition overly brittle  (Mark Dilger <hornschnorter@gmail.com>)
Ответы Re: [HACKERS] pg_class.relpartbound definition overly brittle  (Mark Dilger <hornschnorter@gmail.com>)
Список pgsql-hackers
Mark Dilger wrote:
> Hackers,
> 
> recent changes have introduced the :location field to the partboundspec
> in pg_catalog.pg_class.  This means that if two identical tables with
> identical partitioning scheme are created, but one is done before a change
> to gram.y, and the other after a change to gram.y, the relpartbound fields
> for those two tables could show up as different.

Actually, if you look at equalfuncs.c, you'll note that locations are
not really compared:

/* Compare a parse location field (this is a no-op, per note above) */
#define COMPARE_LOCATION_FIELD(fldname) \((void) 0)

where the referenced note is:
* NOTE: it is intentional that parse location fields (in nodes that have* one) are not compared.  This is because we
want,for example, a variable* "x" to be considered equal() to another reference to "x" in the query.
 

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key