Re: Existence check for suitable index in advance when concurrently refreshing. - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Existence check for suitable index in advance when concurrently refreshing.
Date
Msg-id CAB7nPqRd35a-0dB9Xppzh-+aztbn_gYRDs6TH+HxnC35t-Yx0g@mail.gmail.com
Whole thread Raw
In response to Re: Existence check for suitable index in advance when concurrently refreshing.  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Existence check for suitable index in advance when concurrently refreshing.
List pgsql-hackers
On Tue, Feb 9, 2016 at 4:27 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> Thanks for updating the patch!
> Attached is the updated version of the patch.
> I removed unnecessary assertion check and change of source code
> that you added, and improved the source comment.
> Barring objection, I'll commit this patch.

So, this code basically duplicates what is already in
refresh_by_match_merge to check if there is a UNIQUE index defined. If
we are sure that an error is detected earlier in the code as done in
this patch, wouldn't it be better to replace the error message in
refresh_by_match_merge() by an assertion? Just wondering, I would
think that once this patch is applied the existing error message of
refresh_by_match_merge() is just dead code.
-- 
Michael



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [patch] Proposal for \crosstabview in psql
Next
From: "Shulgin, Oleksandr"
Date:
Subject: Re: Add schema-qualified relnames in constraint error messages.