From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Unclear error message |
Date: | 2018-10-08 06:40:49 |
Message-ID: | c3293c5a267d1687d91ef5d8073985af466a02c8.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Michael Paquier wrote:
> On Sun, Oct 07, 2018 at 05:14:30PM +0900, Michael Paquier wrote:
> > Here is a counter-proposal:
> > "cannot use ONLY for foreign key on partitioned table \"%s\" referencing
> > relation \"%s\""
> >
> > +-- also, adding a NOT VALID foreign key should fail
> > +ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b) REFERENCES fk_notpartitioned_pk NOT VALID;
> > +ERROR: cannot add NOT VALID foreign key to relation "fk_notpartitioned_pk"
> > +DETAIL: This feature is not yet supported on partitioned tables.
> >
> > This error should mention "fk_partitioned_fk", and not
> > "fk_notpartitioned_pk", no? The foreign key is added to the former, not
> > the latter.
>
> And after some more study, I finish with the attached. Thoughts?
I'm fine with it.
"cannot use ONLY for foreign key on partitioned table" has a funny ring
to it (after all, ONLY was used for the table, not the foreign key), but
since I could not come up with anything better, I guess there is just
no entirely satisfactory way to phrase it tersely.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Klychkov | 2018-10-08 07:48:46 | Re[2]: Alter index rename concurrently to |
Previous Message | Andrew Gierth | 2018-10-08 04:36:20 | Re: Performance improvements for src/port/snprintf.c |