From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Mark Dilger <hornschnorter(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_class.relpartbound definition overly brittle |
Date: | 2017-05-31 21:49:38 |
Message-ID: | 20170531214938.n7oahwvz5qn7vugq@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-05-31 21:55:06 | Re: UPDATE of partition key |
Previous Message | Andres Freund | 2017-05-31 21:24:38 | Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression |