From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Chris Bandy <bandy(dot)chris(at)gmail(dot)com> |
Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Add schema and table names to partition error |
Date: | 2020-03-03 16:08:46 |
Message-ID: | 20200303160846.GA2728@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> +\set VERBOSITY verbose
> +-- no partitions
> +CREATE TABLE pterr1 (x int, y int, PRIMARY KEY (x, y)) PARTITION BY RANGE (y);
> +INSERT INTO pterr1 VALUES (10, 10);
> +ERROR: 23514: no partition of relation "pterr1" found for row
> +DETAIL: Partition key of the failing row contains (y) = (10).
> +SCHEMA NAME: public
> +TABLE NAME: pterr1
> +LOCATION: ExecFindPartition, execPartition.c:349
This won't work well, because people would be forced to update the .out
file whenever the execPartition.c file changed to add or remove lines
before the one with the error call. Maybe if you want to verify the
schema/table names, use a plpgsql function to extract them, using
GET STACKED DIAGNOSTICS TABLE_NAME = ...
in an exception block?
I'm not sure that this *needs* to be tested, though. Don't we already
verify that errtable() works, elsewhere? I don't suppose you mean to
test that every single ereport() call that includes errtable() contains
a TABLE NAME item.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-03-03 16:09:00 | Re: Allow to_date() and to_timestamp() to accept localized names |
Previous Message | Fujii Masao | 2020-03-03 15:57:16 | Re: Minor issues in .pgpass |