Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table
Date
Msg-id 20170417164325.GY9812@tamriel.snowman.net
Whole thread Raw
In response to Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
Amit,

* Amit Langote (Langote_Amit_f8@lab.ntt.co.jp) wrote:
> OK, I agree.  I tweaked the existing bullet point about differences from
> traditional inheritance when using ONLY with partitioned tables.

Please take a look at the attached and let me know your thoughts on it.
I changed the code to complain again regarding TRUNCATE ONLY, since that
never actually makes sense on a partitioned table, unlike ALTER TABLE
ONLY, and adjusted the error messages and added hints.

> Updated patches attached (0002 and 0003 unchanged).

Regarding these, 0002 changes pg_dump to handle partitions much more
like inheritance, which at least seems like a decent idea but makes me a
bit concerned about making sure we're doing everything correctly.  In
particular, we should really have regression tests for non-inherited
CHECK (and NOT NULL) constraints on partitions.  Perhaps there are tests
covering those cases in the standard regression suite, but it's not
obvious from the SQL.

Thanks!

Stephen

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...
Next
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)