public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Sam Stearns <[email protected]>
Cc: Pgsql-admin <[email protected]>
Cc: Dugan Kniesteadt <[email protected]>
Cc: Henry Ashu <[email protected]>
Cc: Avi Vallarapu <[email protected]>
Subject: Re: INSERT Permission Denied
Date: Thu, 25 Sep 2025 13:32:55 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAN6TVj=v9DZ36E-BFVyacULPRbyvbmJwfWaLRDnKYnTdkWPHsA@mail.gmail.com>
References: <CAN6TVj=MEs68RQJ3sBBNW9CH9OuwnTSj1OpgVvNrE+voWz7aHg@mail.gmail.com>
<[email protected]>
<CAN6TVjm0JfhQ1g7RR52MoFmgjqM7eb0+Lz5NaDGt=WZwXV698w@mail.gmail.com>
<[email protected]>
<CAN6TVj=v9DZ36E-BFVyacULPRbyvbmJwfWaLRDnKYnTdkWPHsA@mail.gmail.com>
Sam Stearns <[email protected]> writes:
> csbstage=*# INSERT INTO treg.cd_combined_office_mappings (
> csbstage(*# tcsi_office_id, combined_office_id, sb2_account_id,
> postal_code, category,
> ...
> ERROR: permission denied for schema treg
> LINE 1: SELECT 1 FROM ONLY "treg"."cd_combined_offices" x WHERE "com...
> ^
> QUERY: SELECT 1 FROM ONLY "treg"."cd_combined_offices" x WHERE
> "combined_office_id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x
> csbstage=!# rollback;
Looking closer, that's not your original query: it looks to be
a foreign-key enforcement query. That'll be run as the owner
of the table (I think the owner of the referencing table, but
I might have that backwards). That owner is what is lacking
permissions.
regards, tom lane
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: INSERT Permission Denied
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox