On Sun, Feb 10, 2019 at 8:50 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > >>> [ invent separate primary and secondary partition dependencies? ]
> Here's a version of the patch that does it that way. Now that I see separate DEPENDENCY_PARTITION_PRI and DEPENDENCY_PARTITION_SEC dependency types, I agree that it's clearer that way. It certainly clarifies what external dependency.c callers are up to. Minor issue here: > ! <varlistentry> > ! <term><symbol>DEPENDENCY_PARTITION_SEC</symbol> > (<literal>S</literal>)</term> > ! <listitem> > ! <para> > ! A <quote>secondary</quote> partition dependency acts identically to > ! a primary one, except that the primary dependency is preferentially > ! referenced in error messages. An object should have at most one > ! primary partition dependency, but there could perhaps be multiple > ! secondary dependencies. > ! Example: actually, we'll set up a child partitioned index with the > ! parent partitioned index as primary partition dependency and the > ! partition table as secondary partition dependency. In this way, > ! if the user tries to drop the child partitioned index, the error > ! message will suggest dropping the parent partitioned index instead > ! (not the table). > </para> I think that the wording for this example needs to be tweaked. Other than that, looks good to me. -- Peter Geoghegan