Re: Unclear error message

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unclear error message
Date: 2018-10-07 09:37:44
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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?

Attachment Content-Type Size
fk-partition-error.patch text/x-diff 3.3 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2018-10-07 11:59:18 Re: Performance improvements for src/port/snprintf.c
Previous Message David Rowley 2018-10-07 08:43:50 Re: Calculate total_table_pages after set_base_rel_sizes()