BUG #19352: SQL Error messages do not include schema name along with table or data object name.

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: keeshd(at)keeshinds(dot)com
Subject: BUG #19352: SQL Error messages do not include schema name along with table or data object name.
Date: 2025-12-12 02:14:40
Message-ID: 19352-51c017bf5177cadd@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 19352
Logged by: David Keeshin
Email address: keeshd(at)keeshinds(dot)com
PostgreSQL version: 16.11
Operating system: Linux
Description:

Here's an actual error that I received:

"Error moving summary data: Error in up_move_from_stage for control_id
c5bcfbd9-1f20-42c1-bb0c-be626b3c15eb:
insert or update on table "followup_data_flow_by_topic" violates
foreign key constraint "followup_data_flow_by_topic_by_topic_id_fkey2" 23503
CONTEXT: PL/pgSQL function interview.up_move_from_stage(uuid,boolean) line
166 at RAISE"

It's confusing. I have a "stage" schema and a "interview" schema in the
database. There is a "followup_data_flow_by_topic' table in the stage
"schema" and one in the "interview" schema. I did just noticed that the
end of the message does include the schema name for the stored procedure -
which by the was created as a stored procedure, not a function.

Ideally this error message would be clearer if the schema name was included
with the data table or object name. i.e.

"Error moving summary data: Error in interview.up_move_from_stage for
control_id c5bcfbd9-1f20-42c1-bb0c-be626b3c15eb:
insert or update on table "interview.followup_data_flow_by_topic" violates
foreign key constraint
"interview.followup_data_flow_by_topic_by_topic_id_fkey2" 23503
CONTEXT: PL/pgSQL function interview.up_move_from_stage(uuid,boolean) line
166 at RAISE"

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kirill Reshke 2025-12-12 09:00:52 Re: BUG #19352: SQL Error messages do not include schema name along with table or data object name.
Previous Message Etsuro Fujita 2025-12-11 11:01:23 Re: BUG #19339: odbc_fdw extension, Not able to read data from foreign tables