Re: Report error position in partition bound check - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Report error position in partition bound check
Date
Msg-id 20200409011103.GJ1606@paquier.xyz
Whole thread Raw
In response to Report error position in partition bound check  (Alexandra Wang <lewang@pivotal.io>)
Responses Re: Report error position in partition bound check
List pgsql-hackers
On Wed, Apr 08, 2020 at 05:15:57PM -0700, Alexandra Wang wrote:
> I have attached a patch to pass in a ParseState to
> check_new_partition_bound() to enable the reporting of the error
> position. Below is what the error message looks like before and after
> applying the patch.
>
> Another option is to not pass the parser_errposition() argument at all
> to ereport() in this function, since the query is relatively short and
> the error message is already descriptive enough.

It depends on the complexity of the relation definition, so adding a
position looks like a good idea to me.  Anyway, even if this looks
like an oversight to me, we are post feature freeze for 13 and that's
an improvement, so this looks like material for PG14 to me.  Are there
more opinions on the matter?

Please note that you forgot to update the regression test output.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Alexandra Wang
Date:
Subject: Re: Report error position in partition bound check
Next
From: Peter Geoghegan
Date:
Subject: Re: Thoughts on "killed tuples" index hint bits support on standby