Re: Foreign keys and partitioned tables
От
Peter Eisentraut
Тема
Re: Foreign keys and partitioned tables
Дата
Msg-id
76b49bd2-faa7-2723-f265-07e1313df1fb@2ndquadrant.com
Ответ на
Re: Foreign keys and partitioned tables (Alvaro Herrera)
Список
Дерево обсуждения
Foreign keys and partitioned tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Foreign keys and partitioned tables Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Foreign keys and partitioned tables Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Tom Lane <tgl@sss.pgh.pa.us>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Robert Haas <robertmhaas@gmail.com>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Foreign keys and partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
On 3/29/18 23:19, Alvaro Herrera wrote: > 0003 is the matter of interest. This is essentially the same code I > posted earlier, rebased to the committed row triggers patch, with a few > minor bug fixes and some changes in the regression tests to try and make > them more comprehensive, including leaving a partitioned table with an > FK to test that the whole pg_dump thing works via the pg_upgrade test. I've only read the tests so far. The functionality appears to work correctly. It's a bit strange how the tests are split up between alter_table.sql and foreign_key.sql, especially since the latter also contains ALTER TABLE checks and vice versa. Some tests are a bit redundant, e.g., this in alter_table.sql: +-- these fail: +INSERT INTO at_partitioned VALUES (1000, 42); +ERROR: insert or update on table "at_partitioned_0" violates foreign key constraint "at_partitioned_reg1_col1_fkey" +DETAIL: Key (reg1_col1)=(42) is not present in table "at_regular1". and +INSERT INTO at_partitioned VALUES (5000, 42); +ERROR: insert or update on table "at_partitioned_0" violates foreign key constraint "at_partitioned_reg1_col1_fkey" +DETAIL: Key (reg1_col1)=(42) is not present in table "at_regular1". There are no documentation changes. The foreign key section in CREATE TABLE does not contain anything about partitioned tables, which is probably an existing omission, but it might be good to fix this up now. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата: