From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: keeshd@keeshinds.com
Subject: BUG #19352: SQL Error messages do not include schema name along with table or data object name.
Date: Fri, 12 Dec 2025 02:14:40 +0000
Message-ID: <19352-51c017bf5177cadd@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 19352
Logged by: David Keeshin
Email address: keeshd@keeshinds.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"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, keeshd@keeshinds.com
Subject: Re: BUG #19352: SQL Error messages do not include schema name along with table or data object name.
In-Reply-To: <19352-51c017bf5177cadd@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox