Limited beta · What is this?

pgTrue is under active development: reports may contain significant mistakes, inaccuracies, or bugs. Please report anything you find to pgtrue@postgres.ai.

pgTrue is an independent fact-check of technical Postgres articles. Read the questions and answers.

pgTrue fact-check

ElephantSeal A-Limited coverage

Embed

The ElephantSeal always shows this report's latest edition and links here. Copies cached elsewhere may update later.

[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/radar.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb)
<a href="https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb"><img src="https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/c8b29788-6fe2-48e5-8db9-35fe26e475eb/wide.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
   :alt: pgTrue fact-check
   :width: 480
   :height: 240

Click the snippet to select all of it, then copy. Where SVG is stripped, as in some email clients and feed readers, change .svg to .png. PNG uses the light theme for Auto. For Markdown PNG embeds, use the HTML snippet where supported to preserve the display size.

Optional colours: append &color=26798E or &labelColor=333C47 after a theme query (use ? for the first parameter). Use 3- or 6-digit hex.

For pages with a light background.

For pages with a dark background. The ElephantSeal gets a thin edge so it does not blend in.

Auto follows the reader's light or dark setting where the host supports it, and shows the light ElephantSeal where it does not.

On a light page
On a dark page

new row violates row-level security policy: the causes (opens in new tab)

now-next.nl
Check before you follow it: 2 claims are wrong.
1
inaccuracy
0
dangerous-recipe
1
misleading
0
imprecise
0
transcription
0
aged
0
withdrawn
15
verified-accurate

Factual B+ · Applicable B+ · Consistent A · Transparent A · Safe —

ReportTechnical fact-check, edition 3 Issued EditionUpdated after review. Corrections are listed below. SubmittedSubmitted by the PostgresAI team. Author responseNo written reply from the author. The article changed 1 time after our first audit; we re-audited each version. See Revisions below. Policy: right-of-reply and corrections policy. pgTrue versionaudited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)

Inaccuracies

F17

Plain INSERT does not disclose which tenant owns the duplicate slug

INACCURATEFactual · holds up after review

Claim ledger

Article says
…three of them that it is not its own…
What is true
Plain INSERT gives the same duplicate-key error for an existing own slug. PostgreSQL 17 documents uniqueness checks outside row policies. The error establishes existence, not ownership. The claimed 3 distinguishing statements must exclude plain INSERT too.
So what
Query the slug under the tenant's SELECT policy before diagnosing a duplicate-key error as another tenant's ownership.
Charitable reading
Separate knowledge that the tenant lacks the slug could establish ownership. The plain INSERT error alone cannot establish it.

Source

Source · REL_17_11 · doc/src/sgml/ddl.sgml:2832-2836Referential integrity checks, such as unique or primary key constraints and foreign key references, always bypass row security to ensure that data integrity is maintained. Care must be taken when developing schemas and row level policies to avoid <quote>covert channel</quote> leaks of information through such referential integrity checks.
In the article · section “What happens on a unique value that belongs to another tenant?”

In the article

excerpt · section “What happens on a unique value that belongs to another tenant?” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

What happens on a unique value that belongs to another tenant?

The upsert is the (USING expression) form: the existing row is not one this tenant may update, and unlike a standalone UPDATE , “an error will be thrown (the UPDATE path will never be silently avoided)”. DO NOTHING reports success with zero rows, so the application believes its row is there. All four tell tenant 2 that the slug is taken, and three of them that it is not its own — DO NOTHING returns the same zero for a slug the tenant already has; why a unique constraint on a tenant table should start with tenant_id is in unique per tenant in PostgreSQL .

All sources and excerpts · 3
Evidence Referential integrity checks, such as unique or primary key constraints and foreign key references, always bypass row security to ensure that data integrity is maintained. Care must be taken when developing schemas and row level policies to avoid <quote>covert channel</quote> leaks of information through such referential integrity checks.
Evidence (errcode(ERRCODE_UNIQUE_VIOLATION), errmsg("duplicate key value violates unique constraint \"%s\"", RelationGetRelationName(rel)),
Evidencethey are not applied when the system is performing internal referential integrity checks or validating constraints. This means there are indirect ways to determine that a given value exists. An example of this is attempting to insert a duplicate value into a column that is a primary key or has a unique constraint. If the insert fails then the user can infer that the value already exists.
How the review tested this

Review: We considered the known tenant-1 fixture as charitable context. Plain INSERT still returns the same error for tenant-2 ownership. A tenant-filtered SELECT supplies the missing distinction and prevents wasted diagnosis. We considered the test's known cross-tenant ownership. That knowledge does not come from plain INSERT's error. The same constraint reports an own-tenant duplicate identically. The proposed SELECT distinguishes them.

Dangerous or recipe bugsNone in this edition.

Misleading / imprecise

F1

The duplicate-key branch can misdiagnose a missing SELECT policy

MISLEADINGApplicable · holds up after review

Claim ledger

Article says
A duplicate-key error on the plain INSERT counts as No.
What is true
A duplicate-key error does not exclude a missing SELECT policy. Setup C permits plain INSERT but rejects the explicit-target upsert's SELECT check. ExecInsert checks policies before constraints at nodeModifyTable.c:1018. An existing key then sends the tree toward the wrong cause.
So what
Treat a duplicate-key result as inconclusive. Repeat the plain INSERT with a fresh key before excluding SELECT policies.
Charitable reading
The tree covers only the measured tenant-policy setups. Setup C still provides a counterexample within that scope.

Source

Source · REL_17_11 · src/backend/executor/nodeModifyTable.c:1018-1025if (resultRelInfo->ri_WithCheckOptions != NIL) ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate); /* * Check the constraints of the tuple. */ if (resultRelationDesc->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate);
In the article · section “The message has four forms”

In the article

excerpt · section “The message has four forms” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

The message has four forms

The tree covers the causes we measured, with a tenant in a session variable called app.tenant ; use your own setting's name. A duplicate-key error on the plain INSERT counts as No. A policy that checks something else can fail for other reasons.

All sources and excerpts · 4
Evidence if (resultRelInfo->ri_WithCheckOptions != NIL) ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate); /* * Check the constraints of the tuple. */ if (resultRelationDesc->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate);
Evidence /* * Get and add ALL/SELECT policies, if SELECT rights are required for * this relation (eg: when RETURNING is used). These are added as WCO * policies rather than security quals to ensure that an error is * raised if a policy is violated; otherwise, we might end up silently * dropping rows to be added.
Evidence If an <literal>INSERT</literal> has an <literal>ON CONFLICT DO UPDATE</literal> clause, or an <literal>ON CONFLICT DO NOTHING</literal> clause with an arbiter index or constraint specification, then <literal>SELECT</literal> permissions are required on the relation, and the rows proposed for insertion are checked using the relation's <literal>SELECT</literal> policies. If a row proposed for insertion does not satisfy the relation's <literal>SELECT</literal> policies, an error is thrown
Evidence Referential integrity checks, such as unique or primary key constraints and foreign key references, always bypass row security to ensure that data integrity is maintained. Care must be taken when developing schemas and row level policies to avoid <quote>covert channel</quote> leaks of information through such referential integrity checks.
How the review tested this

Review: We tested the tree's restricted scope against setup C. An existing key still routes a missing SELECT policy toward incorrect causes. Retrying with a fresh key addresses wasted diagnostic work. We tested the tree's stated scope against setup C. An existing key defeats the duplicate-key branch despite valid INSERT permission. Checking a fresh key avoids the documented misdiagnosis.

Verified accurate

F3

Permissive failures omit names and restrictive failures can name policies

ACCURATEFactual · holds up after review

Claim ledger

Article says
…a row that no permissive policy lets through…
What is true
rowsecurity.c:839 combines permissive checks without a policy name. It adds named restrictive checks afterward at line 863. execMain.c:2199 reports SQLSTATE 42501 for a failed unnamed new-row check.
Charitable reading
We checked the claim under the article's enforced-RLS, nonowner setup.

Source

Source · REL_17_11 · src/backend/rewrite/rowsecurity.c:839-843* Add a single WithCheckOption for all the permissive policy clauses, * combining them together using OR. This check has no policy name, * since if the check fails it means that no policy granted permission * to perform the update, rather than any particular policy being * violated.
In the article · section “The message has four forms”

In the article

excerpt · section “The message has four forms” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

The message has four forms

A name in the message was a restrictive policy in every test we ran. It does not have to be a policy for inserts: with a restrictive select policy, a plain insert went in and the same insert with RETURNING id named that policy. In setup E, inserting an own row with a long body named p_short . Inserting a row for tenant 3 with a long body gave the plain form, without a name: a row that no permissive policy lets through is reported that way, whatever the restrictive policy would have said.

All sources and excerpts · 4
Evidence * Add a single WithCheckOption for all the permissive policy clauses, * combining them together using OR. This check has no policy name, * since if the check fails it means that no policy granted permission * to perform the update, rather than any particular policy being * violated.
Evidence * Now add WithCheckOptions for each of the restrictive policy clauses * (which will be combined together using AND). We use a separate * WithCheckOption for each restrictive policy to allow the policy * name to be included in error reports if the policy is violated.
Evidence42501 E ERRCODE_INSUFFICIENT_PRIVILEGE insufficient_privilege
Evidence ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("new row violates row-level security policy for table \"%s\"", wco->relname)));
How the review tested this

Review: We checked whether permissive failures could name individual policies. PostgreSQL combines them into an unnamed check before named restrictive checks. SQLSTATE 42501 matches. We checked whether failed permissive policies could supply a policy name. Their combined check omits names. Separate restrictive checks retain names. The executor uses SQLSTATE 42501.

F4

INSERT policies run before conflict detection

ACCURATEFactual · holds up after review

Claim ledger

Article says
…the insert policy is checked before PostgreSQL knows whether there is a conflict…
What is true
nodeModifyTable.c:1018 checks the proposed row's policies. Its conflict-index check follows at line 1064. ON CONFLICT DO NOTHING and DO UPDATE cannot bypass an INSERT-policy failure.
Charitable reading
The claim describes policy-check order within the shown INSERT execution path.

Source

Source · REL_17_11 · src/backend/executor/nodeModifyTable.c:1018-1025if (resultRelInfo->ri_WithCheckOptions != NIL) ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate); /* * Check the constraints of the tuple. */ if (resultRelationDesc->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate);
In the article · section “Why does an upsert fail when the row already exists?”

In the article

excerpt · section “Why does an upsert fail when the row already exists?” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Why does an upsert fail when the row already exists?

Because the insert policy is checked before PostgreSQL knows whether there is a conflict. In setup B the role may read and update its rows but has no policy for inserts. Write 7 would only ever update, and it still failed; so did write 5, which would have done nothing. The documentation says so: an INSERT with ON CONFLICT DO NOTHING/UPDATE “will check the INSERT policies’ WITH CHECK expressions for all rows proposed for insertion, regardless of whether or not they end up being inserted”.

All sources and excerpts · 2
Evidence if (resultRelInfo->ri_WithCheckOptions != NIL) ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate); /* * Check the constraints of the tuple. */ if (resultRelationDesc->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate);
Evidence specConflict = false; if (!ExecCheckIndexConstraints(resultRelInfo, slot, estate, &conflictTid, arbiterIndexes))
How the review tested this

Review: We checked whether conflict detection precedes INSERT policy checks. ExecWithCheckOptions runs before ExecCheckIndexConstraints, including the DO NOTHING path. We checked whether conflict handling could precede policy acceptance. ExecWithCheckOptions runs before ExecCheckIndexConstraints in the cited INSERT path.

F5

The shown RETURNING and conflict-target writes require SELECT policies

ACCURATEFactual · holds up after review

Claim ledger

Article says
…RETURNING and ON CONFLICT with a conflict target apply those to the new row too…
What is true
rowsecurity.c:278 adds SELECT policies as new-row checks when SELECT rights are required. create_policy.sgml:296 confirms explicit-target conflict handling. Column-reading WHERE clauses also apply SELECT filters to existing rows at rowsecurity.c:230.
Charitable reading
RETURNING refers to the article's RETURNING id examples. Their expressions read target columns.

Source

Source · REL_17_11 · src/backend/rewrite/rowsecurity.c:278-283/* * Get and add ALL/SELECT policies, if SELECT rights are required for * this relation (eg: when RETURNING is used). These are added as WCO * policies rather than security quals to ensure that an error is * raised if a policy is violated; otherwise, we might end up silently * dropping rows to be added.
In the article · section “The message has four forms”

In the article

excerpt · section “The message has four forms” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

The message has four forms

A policy name A restrictive policy refused the row The name in the message is that policy; read its WITH CHECK , or its USING if it has none. It can be a select policy: RETURNING and ON CONFLICT with a conflict target apply those to the new row too.

All sources and excerpts · 3
Evidence /* * Get and add ALL/SELECT policies, if SELECT rights are required for * this relation (eg: when RETURNING is used). These are added as WCO * policies rather than security quals to ensure that an error is * raised if a policy is violated; otherwise, we might end up silently * dropping rows to be added.
Evidence If an <literal>INSERT</literal> has an <literal>ON CONFLICT DO UPDATE</literal> clause, or an <literal>ON CONFLICT DO NOTHING</literal> clause with an arbiter index or constraint specification, then <literal>SELECT</literal> permissions are required on the relation, and the rows proposed for insertion are checked using the relation's <literal>SELECT</literal> policies. If a row proposed for insertion does not satisfy the relation's <literal>SELECT</literal> policies, an error is thrown
Evidence /* * Similar to above, during an UPDATE, DELETE, or MERGE, if SELECT rights * are also required (eg: when a RETURNING clause exists, or the user has * provided a WHERE clause which involves columns from the relation), we * collect up CMD_SELECT policies and add them via add_security_quals * first. * * This way, we filter out any records which are not visible through an * ALL or SELECT USING policy.
How the review tested this

Review: We considered RETURNING expressions that require no target-column access. The finding explicitly covers RETURNING id and conditions checks on required SELECT rights. We considered RETURNING expressions that read no target columns. The finding limits its claim to the shown column-reading examples. Targeted conflict handling requires SELECT checks.

F6

MERGE applies policies for the action it executes

ACCURATEFactual · holds up after review

Claim ledger

Article says
…No separate policy exists for MERGE.
What is true
create_policy.sgml:743 defines no separate MERGE policy. nodeModifyTable.c:2992 checks action policies after WHEN conditions. SELECT filters can hide an existing target row before matching, so an INSERT action can encounter its unique key.
Charitable reading
The matched-row explanation concerns the article's UPDATE action, not every possible MERGE action.

Source

Source · REL_17_11 · doc/src/sgml/ref/create_policy.sgml:743-747No separate policy exists for <command>MERGE</command>. Instead, the policies defined for <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command> are applied while executing <command>MERGE</command>, depending on the actions that are performed.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…No separate policy exists for MERGE.
All sources and excerpts · 4
Evidence No separate policy exists for <command>MERGE</command>. Instead, the policies defined for <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command> are applied while executing <command>MERGE</command>, depending on the actions that are performed.
Evidence * NOTE: We must do this after WHEN quals are evaluated, so that we * check policies only when they matter. */ if (resultRelInfo->ri_WithCheckOptions && commandType != CMD_NOTHING) { ExecWithCheckOptions(commandType == CMD_UPDATE ? WCO_RLS_MERGE_UPDATE_CHECK : WCO_RLS_MERGE_DELETE_CHECK, resultRelInfo, resultRelInfo->ri_oldTupleSlot, context->mtstate->ps.state);
Evidence /* * Similar to above, during an UPDATE, DELETE, or MERGE, if SELECT rights * are also required (eg: when a RETURNING clause exists, or the user has * provided a WHERE clause which involves columns from the relation), we * collect up CMD_SELECT policies and add them via add_security_quals * first. * * This way, we filter out any records which are not visible through an * ALL or SELECT USING policy.
EvidenceNo separate policy exists for MERGE
How the review tested this

Review: We checked whether unexecuted MERGE actions trigger these checks. The executor evaluates WHEN conditions first. SELECT filtering explains hidden target rows. We checked whether MERGE applies every action's policies unconditionally. Action checks follow WHEN evaluation. SELECT filters separately determine which target rows remain visible.

F7

BEFORE triggers precede policy and NOT NULL checks

ACCURATEFactual · holds up after review

Claim ledger

Article says
…WITH CHECK is enforced after BEFORE triggers…
What is true
nodeModifyTable.c:840 runs BEFORE INSERT triggers before policy checks at line 1018. Constraint checks follow at line 1024. The modified tenant value can change policy acceptance. A policy rejection can precede the column's NOT NULL error.
Charitable reading
The trigger changes the proposed tenant before the policy expression examines that tuple.

Source

Source · REL_17_11 · src/backend/executor/nodeModifyTable.c:1018-1025if (resultRelInfo->ri_WithCheckOptions != NIL) ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate); /* * Check the constraints of the tuple. */ if (resultRelationDesc->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate);
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…WITH CHECK is enforced after BEFORE triggers…
All sources and excerpts · 4
Evidence if (resultRelInfo->ri_WithCheckOptions != NIL) ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate); /* * Check the constraints of the tuple. */ if (resultRelationDesc->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate);
Evidence <literal>WITH CHECK</literal> expressions are enforced after <literal>BEFORE</literal> triggers are fired, and before any actual data modifications are made. Thus a <literal>BEFORE ROW</literal> trigger may modify the data to be inserted, affecting the result of the security policy check. <literal>WITH CHECK</literal> expressions are enforced before any other constraints.
Evidence if (!ExecBRInsertTriggers(estate, resultRelInfo, slot)) return NULL; /* "do nothing" */
EvidenceWITH CHECK expressions are enforced after BEFORE triggers are fired
How the review tested this

Review: We checked whether NOT NULL validation could precede the stated policy failure. BEFORE INSERT triggers run first, policy checks second, constraints third. We checked whether NOT NULL enforcement precedes policy rejection. BEFORE INSERT triggers run first, policy checks follow, and ExecConstraints runs afterward.

F8

Verified accurate: “…Check pg_policies for the command and the role, then the row's tenant_id…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
…Check pg_policies for the command and the role, then the row's tenant_id…
What is true
system_views.sql:95–103 exposes cmd, qual, and with_check. It maps command codes to SELECT, INSERT, UPDATE, DELETE, and ALL. rowsecurity.c:921–928 accepts PUBLIC and checks inherited role privileges.

Source

Source · REL_17_11 · src/backend/catalog/system_views.sql:95-103CASE pol.polcmd WHEN 'r' THEN 'SELECT' WHEN 'a' THEN 'INSERT' WHEN 'w' THEN 'UPDATE' WHEN 'd' THEN 'DELETE' WHEN '*' THEN 'ALL' END AS cmd, pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS qual, pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS with_check
In the article · section “The message has four forms”

In the article

excerpt · section “The message has four forms” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

The message has four forms

Yes No policy for inserts applies to this role, or the row is for another tenant Check pg_policies for the command and the role, then the row's tenant_id .

All sources and excerpts · 3
Evidence CASE pol.polcmd WHEN 'r' THEN 'SELECT' WHEN 'a' THEN 'INSERT' WHEN 'w' THEN 'UPDATE' WHEN 'd' THEN 'DELETE' WHEN '*' THEN 'ALL' END AS cmd, pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS qual, pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS with_check
Evidence <para> The view <structname>pg_policies</structname> provides access to useful information about each row-level security policy in the database.
Evidence /* Quick fall-thru for policies applied to all roles */ if (roles[0] == ACL_ID_PUBLIC) return true; for (i = 0; i < ARR_DIMS(policy_roles)[0]; i++) { if (has_privs_of_role(user_id, roles[i])) return true;
How the review tested this

Review: E-25 records three diagnostic fields, not every requested field. E-26 provides only the view description. We narrowed the endorsement to those fields and the recorded role checks.

F9

Verified accurate: “A bulk import under row-level security is INSERT statements, or a role that bypasses the…”

ACCURATEFactual · partly holds after review

Claim ledger

Article says
A bulk import under row-level security is INSERT statements, or a role that bypasses the policy.
What is true
copy.c:228–232 contains the COPY FROM rejection for row-level security. The error recommends INSERT statements. This range does not establish which roles avoid that rejection.

Source

Source · REL_17_11 · src/backend/commands/copy.c:228-232if (is_from) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("COPY FROM not supported with row-level security"), errhint("Use INSERT statements instead.")));
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)A bulk import under row-level security is INSERT statements, or a role that bypasses the policy.
All sources and excerpts · 1
Evidence if (is_from) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("COPY FROM not supported with row-level security"), errhint("Use INSERT statements instead.")));
How the review tested this

Review: E-27 contains the rejection and INSERT hint. It omits the enclosing RLS guard and role-exemption logic. We removed the exemption assertion from the evidence-backed conclusion.

F10

Ordinary table owners bypass RLS unless FORCE applies

ACCURATEFactual · holds up after review

Claim ledger

Article says
If your application connects as the owner, the absence of this error is the problem.
What is true
rls.c:91 documents the ordinary owner exemption and FORCE exception. Under the article's setup, connecting as the owner can admit a row that app would fail.
Charitable reading
The immediately preceding sentences distinguish ordinary owner access from FORCE ROW LEVEL SECURITY.

Source

Source · REL_17_11 · src/backend/utils/misc/rls.c:91-93* Table owners generally bypass RLS, except if the table has been set (by * an owner) to FORCE ROW SECURITY, and this is not a referential * integrity check.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)If your application connects as the owner, the absence of this error is the problem.
All sources and excerpts · 1
Evidence * Table owners generally bypass RLS, except if the table has been set (by * an owner) to FORCE ROW SECURITY, and this is not a referential * integrity check.
How the review tested this

Review: We considered FORCE, BYPASSRLS, and internal integrity checks. The finding limits its conclusion to ordinary owners under the article's setup. We considered FORCE and BYPASSRLS exceptions. The finding explicitly concerns ordinary owners and preserves the FORCE qualification stated beside the article quote.

F11

Missing and empty tenant settings produce a NULL comparison

ACCURATEFactual · holds up after review

Claim ledger

Article says
An empty or missing setting makes the comparison NULL…
What is true
guc_funcs.c:834 returns NULL for an absent setting with missing_ok. NULLIF converts an empty setting to NULL. func.sgml:645 confirms that ordinary comparisons with NULL yield NULL. The article's expression handles both cases as stated.
Charitable reading
The comparison includes the article's NULLIF wrapper around current_setting.

Source

Source · REL_17_11 · src/backend/utils/misc/guc_funcs.c:834-839/* return NULL if no such variable */ if (varval == NULL) PG_RETURN_NULL(); /* Convert to text */ PG_RETURN_TEXT_P(cstring_to_text(varval));
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)An empty or missing setting makes the comparison NULL…
All sources and excerpts · 3
Evidence /* return NULL if no such variable */ if (varval == NULL) PG_RETURN_NULL(); /* Convert to text */ PG_RETURN_TEXT_P(cstring_to_text(varval));
Evidence The <function>NULLIF</function> function returns a null value if <replaceable>value1</replaceable> equals <replaceable>value2</replaceable>; otherwise it returns <replaceable>value1</replaceable>.
Evidence Ordinary comparison operators yield null (signifying <quote>unknown</quote>), not true or false, when either input is null. For example,
How the review tested this

Review: We distinguished an absent setting from an empty string. missing_ok handles absence, and the article's NULLIF handles emptiness before comparison. We checked whether an empty string would instead cause an integer-cast error. The article's NULLIF wrapper converts it to NULL first.

F12

Run transaction-local diagnostics before the failing statement

ACCURATEFactual · holds up after review

Claim ledger

Article says
…run in the same transaction just before the write that fails…
What is true
postgres.c:1139 rejects ordinary commands while the transaction remains aborted. Running the diagnostic SELECT statements before the failing write preserves access to that transaction's tenant setting.
Charitable reading
The diagnostic concerns an explicit transaction that has not recovered through a savepoint or rollback.

Source

Source · REL_17_11 · src/backend/tcop/postgres.c:1139-1145if (IsAbortedTransactionBlockState() && !IsTransactionExitStmt(parsetree->stmt)) ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " "commands ignored until end of transaction block"), errdetail_abort()));
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…run in the same transaction just before the write that fails…
All sources and excerpts · 1
Evidence if (IsAbortedTransactionBlockState() && !IsTransactionExitStmt(parsetree->stmt)) ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " "commands ignored until end of transaction block"), errdetail_abort()));
How the review tested this

Review: We considered savepoint recovery and transaction-exit commands. The finding concerns ordinary diagnostics while the transaction remains aborted, which postgres.c rejects. We considered recovery through rollback or savepoints. The finding concerns commands issued while the transaction remains aborted. PostgreSQL rejects those diagnostic SELECT statements.

F13

ON CONFLICT still checks INSERT policies

ACCURATEFactual · holds up after review

Claim ledger

Article says
…regardless of whether or not they end up being inserted…
What is true
PostgreSQL 17 CREATE POLICY documents INSERT policy checks for every proposed row. Conflict handling does not exempt existing rows.
Charitable reading
The statement concerns rows proposed for insertion, including rows later handled by conflict actions.

Source

Source · https://www.postgresql.org/docs/17/sql-createpolicy.htmlregardless of whether or not they end up being inserted
In the article · section “Why does an upsert fail when the row already exists?”

In the article

excerpt · section “Why does an upsert fail when the row already exists?” · as fetched 2026-10-19 · open in article ↗ (opens in new tab)

Why does an upsert fail when the row already exists?

Because the insert policy is checked before PostgreSQL knows whether there is a conflict. In setup B the role may read and update its rows but has no policy for inserts. Write 7 would only ever update, and it still failed; so did write 5, which would have done nothing. The documentation says so: an INSERT with ON CONFLICT DO NOTHING/UPDATE “will check the INSERT policies’ WITH CHECK expressions for all rows proposed for insertion, regardless of whether or not they end up being inserted”.

All sources and excerpts · 1
Evidenceregardless of whether or not they end up being inserted
How the review tested this

Review: We checked the quotation's surrounding documentation for conflict-action exceptions. PostgreSQL 17 explicitly applies INSERT checks to every proposed row. We checked the documentation's proposed-row qualification. INSERT policy checks apply even when conflict handling prevents insertion. The finding does not verify execution history.

F14

RETURNING id adds a SELECT policy check

ACCURATEFactual · holds up after review

Claim ledger

Article says
…must satisfy the relation’s SELECT policies…
What is true
PostgreSQL 17 CREATE POLICY requires returned inserted rows to satisfy SELECT policies. The article quotes that requirement accurately.
Charitable reading
The examples return id, a column of the protected relation.

Source

Source · https://www.postgresql.org/docs/17/sql-createpolicy.htmlmust satisfy the relation's SELECT policies
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…must satisfy the relation’s SELECT policies…
All sources and excerpts · 1
Evidencemust satisfy the relation's SELECT policies
How the review tested this

Review: We considered constant RETURNING expressions. The finding's title and stated scope concern RETURNING id, which reads the protected relation. We tested the scope against RETURNING expressions without target-column references. The finding specifically covers RETURNING id, which the documented SELECT-policy requirement supports.

F15

Targeted ON CONFLICT checks SELECT policies

ACCURATEFactual · holds up after review

Claim ledger

Article says
…the rows proposed for insertion are checked using the relation’s SELECT policies…
What is true
PostgreSQL 17 documents SELECT checks for DO UPDATE and DO NOTHING with an arbiter index or constraint specification.
Charitable reading
The article limits DO NOTHING's additional check to statements with a conflict target.

Source

Source · https://www.postgresql.org/docs/17/sql-createpolicy.htmlthe rows proposed for insertion are checked using the relation's SELECT policies
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…the rows proposed for insertion are checked using the relation’s SELECT policies…
All sources and excerpts · 1
Evidencethe rows proposed for insertion are checked using the relation's SELECT policies
How the review tested this

Review: We checked whether the finding incorrectly includes bare DO NOTHING. It preserves the documentation's arbiter specification condition. We checked whether the finding extends SELECT checks to bare DO NOTHING. It preserves the documentation's arbiter-specification qualification.

F18

The matrix contains 11 writes across 5 setups

ACCURATEFactual · holds up after review

Claim ledger

Article says
…eleven writes against five policy setups…
What is true
The full matrix uses A, B, C, D and F. Its 11 numbered writes give 55 displayed outcomes. Setup E belongs to the additional tests.
Charitable reading
The 5 setups refer to the full matrix. Setup E and its variants receive additional tests.

Checked for internal consistency: the evidence is the article itself.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…eleven writes against five policy setups…
How the review tested this

Review: We counted 11 matrix rows and columns A, B, C, D, F. Setup E belongs to additional tests. The finding verifies 55 displayed outcomes, not execution history. We counted A, B, C, D and F as five matrix setups. Eleven numbered writes produce 55 displayed outcomes. Setup E belongs to the additional tests.

F19

The stated starting population totals 15 rows

ACCURATEFactual · holds up after review

Claim ledger

Article says
…three tenants with five rows each…
What is true
The stated population is 15 rows (derived: 3 tenants × 5 rows per tenant). The later starting-row count agrees.
Charitable reading
The 15-row claim describes the initial population before each rolled-back write.

Checked for internal consistency: the evidence is the article itself.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…three tenants with five rows each…
How the review tested this

Review: We recalculated the population: 3 tenants × 5 rows per tenant equals 15 rows. The finding checks stated arithmetic without claiming independent execution evidence. We recalculated 3 tenants multiplied by 5 rows per tenant. The result matches the stated 15-row population. The finding expressly limits verification to arithmetic.

More in this report

Section checks · 9 sections

Section checks

AspectGradeFindingsCoverage
Test setupA1 verified-accurate100% of claims (15 of 15, plus 4 that need data we do not have)
Message formsA1 verified-accurate50% of claims (1 of 2, plus 8 that need data we do not have)provisional
Decision treeB+1 misleading66% of claims (6 of 9, plus 2 that need data we do not have)
Write resultsA1 verified-accurate100% of claims (5 of 5, plus 59 that need data we do not have)
Upsert and MERGEA3 verified-accurate100% of claims (6 of 6, plus 2 that need data we do not have)
SELECT policies on writesA3 verified-accurate100% of claims (4 of 4, plus 2 that need data we do not have)
Cross-tenant unique valuesB+1 inaccuracy50% of claims (2 of 4, plus 7 that need data we do not have)provisional
Other outcomesA3 verified-accurate75% of claims (6 of 8, plus 11 that need data we do not have)
Database diagnosticsA3 verified-accurate75% of claims (9 of 12)
Coverage and assessment · Checked 65 of 81 Postgres claims across 13 sections

A- — the findings address the article's main subject. What we did not check is listed below. We checked PostgreSQL 17.11 policy enforcement, message forms, write behavior, and diagnostic advice against source and documentation.

We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.

What we did not check

  • We did not reproduce the PostgreSQL 17.11 measurements or verify the original transaction logs.
  • We did not evaluate the tenant_id index position against application workloads.
  • We did not reproduce the article's result matrix or additional restrictive-policy tests.
  • We could not verify the PostgreSQL 17.11 container or the reported execution date.
  • We did not check every diagnostic, policy exception, or linked troubleshooting article against primary evidence.
  • We did not establish release changes after the article's publication.
  • We could not retrieve the services page.
  • We did not reproduce the measurements the article displays.
  • We could not compare the summarized writes with complete SQL statements and execution transcripts.
  • Section “Message forms”: we checked 1 of 10 checkable claims.
  • Section “Cross-tenant unique values”: we checked 2 of 11 checkable claims.
  • Section “Introduction”: we checked 4 of 13 checkable claims.
  • Section “Measurement scope”: we checked 1 of 2 checkable claims.
  • We could not decide whether the article depends on finding F17.
Checked 65 of 81 Postgres claims across 13 sections
  • Introduction: 4 of 7 Postgres claims checked, plus 6 that need data we do not have; not counted: 4 not a claim; not checked: 3 for other reasons
  • Error meaning: 6 of 7 Postgres claims checked, plus 3 that need data we do not have; not counted: 3 duplicate, 1 not a claim; not checked: 1 for other reasons
  • Test setup: 15 of 15 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 not a claim
  • Message forms: 1 of 2 Postgres claims checked, plus 8 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
  • Decision tree: 6 of 9 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 product or opinion, 2 duplicate, 1 not a claim; not checked: 3 for other reasons
  • Write results: 5 of 5 Postgres claims checked, plus 59 that need data we do not have; not counted: 1 not a claim
  • Upsert and MERGE: 6 of 6 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim
  • SELECT policies on writes: 4 of 4 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 duplicate, 1 not a claim
  • Cross-tenant unique values: 2 of 4 Postgres claims checked, plus 7 that need data we do not have; not counted: 1 product or opinion, 1 duplicate, 2 not a claim; not checked: 2 for other reasons
  • Other outcomes: 6 of 8 Postgres claims checked, plus 11 that need data we do not have; not counted: 1 duplicate, 3 not a claim; not checked: 2 for other reasons
  • Database diagnostics: 9 of 12 Postgres claims checked; not counted: 1 product or opinion, 1 duplicate, 3 not a claim; not checked: 3 for other reasons
  • Measurement scope: 1 of 2 Postgres claims checked; not counted: 1 product or opinion, 1 duplicate, 8 not a claim; not checked: 1 for other reasons
  • Publisher and related reading: no checkable claims; not counted: 3 product or opinion, 9 not a claim

Average of 4 axes: 3.65 · result A-

Some explanatory text is not shown in this edition; the grade and findings are complete.

Scorecard · the five axes
FACTS scorecard Scorecard radar, 5 axes, bigger is better. Overall A-. Factual B+ · 1 wrong of 17 checked · 0 caveats. Applicable B+ · 1 wrong of 8 checked · 0 caveats. Consistent A · 0 wrong of 17 checked · 0 caveats. Transparent A · 0 wrong of 6 checked · 0 caveats. Safe not applicable (n/a). B+ 1 wrong of 17 checked · 0 caveatsFactual B+1 wrong of 170 caveats B+ 1 wrong of 8 checked · 0 caveatsApplicable B+1 wrong of 80 caveats A 0 wrong of 17 checked · 0 caveatsConsistent A0 wrong of 170 caveats A 0 wrong of 6 checked · 0 caveatsTransparent A0 wrong of 60 caveats not applicable (n/a), 2 commands scanned none riskySafe n/a2 commands scannednone risky

By topic: Test setup — 1 finding, 0 wrong · Message forms — 1 finding, 0 wrong · Decision tree — 1 finding, 1 wrong · Write results — 1 finding, 0 wrong · Upsert and MERGE — 3 findings, 0 wrong · SELECT policies on writes — 3 findings, 0 wrong · Cross-tenant unique values — 1 finding, 1 wrong · Other outcomes — 3 findings, 0 wrong · Database diagnostics — 3 findings, 0 wrong

Further out is better. Each axis has its own letter, from the wrong claims and caveats among the claims we checked of that kind.

Checked on the FACTS: Factual, Applicable, Consistent, Transparent, Safe. Clockwise: Factual (is it true?), Applicable (does it apply to my setup, today?), Consistent (does it agree with itself?), Transparent (can I check it myself?), Safe (can I run this on prod?).

We checked 17 claims, 2 commands scanned.

AxisLetterWrongCaveatsCheckedCoverage
FactualB+1017assessed: B+ · 1 wrong of 17 checked · 0 caveats
ApplicableB+108assessed: B+ · 1 wrong of 8 checked · 0 caveats
ConsistentA0017assessed: A · 0 wrong of 17 checked · 0 caveats
TransparentA006assessed: A · 0 wrong of 6 checked · 0 caveats
Safe—000assessed
Topics · 9 topics

Topics

TopicFactualApplicableConsistentTransparentSafe
Test setup0 issues 1 checked F190 issues 1 checked0 issues 1 checked
Message forms0 issues 1 checked F30 issues 1 checked0 issues 1 checked
Decision tree0 issues 1 checked1 issue 1 checked F10 issues 1 checked
Write results0 issues 1 checked F180 issues 1 checked0 issues 1 checked
Upsert and MERGE0 issues 3 checked F4 F6 F130 issues 1 checked0 issues 3 checked0 issues 1 checked
SELECT policies on writes0 issues 3 checked F5 F14 F150 issues 3 checked0 issues 3 checked0 issues 2 checked
Cross-tenant unique values1 issue 1 checked F170 issues 1 checked0 issues 1 checked
Other outcomes0 issues 3 checked F7 F9 F100 issues 1 checked0 issues 3 checked
Database diagnostics0 issues 3 checked F8 F11 F120 issues 1 checked0 issues 3 checked

Issues found among the claims checked, per topic and axis. Each link goes to the finding behind the count.

Revisions: 3 · B -> A- -> A-

We audited this article 3 times. Each row is the final edition of one audit. Letters and findings of earlier revisions stay readable at their own address.

  1. Revision 1 · B · audit version not recorded

    Details unavailable.

    ElephantSeal: B.

  2. Revision 2 · 2026-10-11 06:38 UTC · A- · audit version not recorded · regrade version not recorded

    Same article text, re-audited. 11 accurate · 2 wrong · 0 caveats.

    ElephantSeal: A-.

    Changes: Details unavailable.

  3. Revision 3 · this page · 2026-10-19 07:59 UTC · A- · audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)

    Article text changed. 15 accurate · 2 wrong · 0 caveats.

    ElephantSeal: A-.

    Changes: No longer reported: “All four tell tenant 2 that the slug is taken, and three of them that it is not its own…”; “…three of them that it is not its own…”. New: F17 “Plain INSERT does not disclose which tenant owns the duplicate slug” (false); F1 “The duplicate-key branch can misdiagnose a missing SELECT policy” (misleading).

Questions and answers

Questions and answers

What is pgTrue?

pgTrue is an independent fact-check of technical Postgres articles, made by PostgresAI. It helps you check advice before you use it.

What does the letter grade mean?

The letter grade summarizes the claims we checked. Five axes show what we checked:

  • Factual: is it true?
  • Applicable: does it apply to my setup, today?
  • Consistent: does it agree with itself?
  • Transparent: can I check it myself?
  • Safe: can I run this in production?

What is the ElephantSeal?

The ElephantSeal is the mark an article earns. It always shows the latest edition. “Open:” lists what is still open.

Can an author reply?

Authors can ask us to correct a finding, reply to it, or withdraw it. Right-of-reply policy.

Paste into your AI assistant to fix the article, then ask for a re-review.

Show the text
Fix the article with this report, then ask pgTrue for a re-review.

# pgTrue report: new row violates row-level security policy: the causes

Article title: new row violates row-level security policy: the causes
Article URL: https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy
Report URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb
Audited revision: 3 of 3, 2026-10-19 07:59:09 UTC
Overall letter: A-

## Axes

- Factual: B+ · 1 wrong · 17 checked · 0 caveats · assessed
- Applicable: B+ · 1 wrong · 8 checked · 0 caveats · assessed
- Consistent: A · 0 wrong · 17 checked · 0 caveats · assessed
- Transparent: A · 0 wrong · 6 checked · 0 caveats · assessed
- Safe: — · 0 wrong · 0 checked · 0 caveats · assessed

ElephantSeal: A-.

## Report metadata

- Report: Technical fact-check, edition 3
- Issued: 2026-10-19
- Edition: Updated after review. Corrections are listed below.
- Submitted: Submitted by the PostgresAI team.
- Author response: No written reply from the author. The article changed 1 time after our first audit; we re-audited each version. See Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).
- pgTrue version: audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)

## Findings needing a change (2)

### F17 · Inaccurate · Factual · Plain INSERT does not disclose which tenant owns the duplicate slug
Location: excerpt · section “What happens on a unique value that belongs to another tenant?” · as fetched 2026-10-19 · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=three%20of%20them%20that%20it%20is%20not%20its%20own)
Article says:
```text
…three of them that it is not its own…
```
What is true:
Plain INSERT gives the same duplicate-key error for an existing own slug. PostgreSQL 17 documents uniqueness checks outside row policies. The error establishes existence, not ownership. The claimed 3 distinguishing statements must exclude plain INSERT too.
So what:
Query the slug under the tenant's SELECT policy before diagnosing a duplicate-key error as another tenant's ownership.
Charitable reading:
Separate knowledge that the tenant lacks the slug could establish ownership. The plain INSERT error alone cannot establish it.
Review: We considered the known tenant-1 fixture as charitable context. Plain INSERT still returns the same error for tenant-2 ownership. A tenant-filtered SELECT supplies the missing distinction and prevents wasted diagnosis. We considered the test's known cross-tenant ownership. That knowledge does not come from plain INSERT's error. The same constraint reports an own-tenant duplicate identically. The proposed SELECT distinguishes them.

Sources:
- [REL_17_11 · doc/src/sgml/ddl.sgml:2832-2836](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ddl.sgml#L2832-L2836)
  Excerpt:
  ```text
  Referential integrity checks, such as unique or primary key constraints
   and foreign key references, always bypass row security to ensure that
   data integrity is maintained.  Care must be taken when developing
   schemas and row level policies to avoid <quote>covert channel</quote> leaks of
   information through such referential integrity checks.
  ```
- [REL_17_11 · src/backend/access/nbtree/nbtinsert.c:667-669](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/access/nbtree/nbtinsert.c#L667-L669)
  Excerpt:
  ```text
  (errcode(ERRCODE_UNIQUE_VIOLATION),
								 errmsg("duplicate key value violates unique constraint \"%s\"",
										RelationGetRelationName(rel)),
  ```
- [https://www.postgresql.org/docs/17/sql-createpolicy.html](https://www.postgresql.org/docs/17/sql-createpolicy.html)
  Excerpt:
  ```text
  they are not applied when the system is performing internal referential integrity checks or validating constraints. This means there are indirect ways to determine that a given value exists. An example of this is attempting to insert a duplicate value into a column that is a primary key or has a unique constraint. If the insert fails then the user can infer that the value already exists.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F17

### F1 · Misleading · Applicable · The duplicate-key branch can misdiagnose a missing SELECT policy
Location: excerpt · section “The message has four forms” · as fetched 2026-10-19 · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=A%20duplicate%2Dkey%20error%20on%20the%20plain%20INSERT%20counts%20as%20No.)
Article says:
```text
A duplicate-key error on the plain INSERT counts as No.
```
What is true:
A duplicate-key error does not exclude a missing SELECT policy. Setup C permits plain INSERT but rejects the explicit-target upsert's SELECT check. ExecInsert checks policies before constraints at nodeModifyTable.c:1018. An existing key then sends the tree toward the wrong cause.
So what:
Treat a duplicate-key result as inconclusive. Repeat the plain INSERT with a fresh key before excluding SELECT policies.
Charitable reading:
The tree covers only the measured tenant-policy setups. Setup C still provides a counterexample within that scope.
Review: We tested the tree's restricted scope against setup C. An existing key still routes a missing SELECT policy toward incorrect causes. Retrying with a fresh key addresses wasted diagnostic work. We tested the tree's stated scope against setup C. An existing key defeats the duplicate-key branch despite valid INSERT permission. Checking a fresh key avoids the documented misdiagnosis.

Sources:
- [REL_17_11 · src/backend/executor/nodeModifyTable.c:1018-1025](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/nodeModifyTable.c#L1018-L1025)
  Excerpt:
  ```text
  if (resultRelInfo->ri_WithCheckOptions != NIL)
			ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate);

		/*
		 * Check the constraints of the tuple.
		 */
		if (resultRelationDesc->rd_att->constr)
			ExecConstraints(resultRelInfo, slot, estate);
  ```
- [REL_17_11 · src/backend/rewrite/rowsecurity.c:278-283](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/rewrite/rowsecurity.c#L278-L283)
  Excerpt:
  ```text
  /*
		 * Get and add ALL/SELECT policies, if SELECT rights are required for
		 * this relation (eg: when RETURNING is used).  These are added as WCO
		 * policies rather than security quals to ensure that an error is
		 * raised if a policy is violated; otherwise, we might end up silently
		 * dropping rows to be added.
  ```
- [REL_17_11 · doc/src/sgml/ref/create_policy.sgml:296-303](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/create_policy.sgml#L296-L303)
  Excerpt:
  ```text
  If an <literal>INSERT</literal> has an <literal>ON CONFLICT DO
         UPDATE</literal> clause, or an <literal>ON CONFLICT DO
         NOTHING</literal> clause with an arbiter index or constraint
         specification, then <literal>SELECT</literal>
         permissions are required on the relation, and the rows proposed for
         insertion are checked using the relation's <literal>SELECT</literal>
         policies.  If a row proposed for insertion does not satisfy the
         relation's <literal>SELECT</literal> policies, an error is thrown
  ```
- [REL_17_11 · doc/src/sgml/ddl.sgml:2832-2836](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ddl.sgml#L2832-L2836)
  Excerpt:
  ```text
  Referential integrity checks, such as unique or primary key constraints
   and foreign key references, always bypass row security to ensure that
   data integrity is maintained.  Care must be taken when developing
   schemas and row level policies to avoid <quote>covert channel</quote> leaks of
   information through such referential integrity checks.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F1

## Verified accurate claims (15)

### F3 · Accurate · Factual · Permissive failures omit names and restrictive failures can name policies
Location: excerpt · section “The message has four forms” · as fetched 2026-10-19 · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=a%20row%20that%20no%20permissive%20policy%20lets%20through)
Article says:
```text
…a row that no permissive policy lets through…
```
What is true:
rowsecurity.c:839 combines permissive checks without a policy name. It adds named restrictive checks afterward at line 863. execMain.c:2199 reports SQLSTATE 42501 for a failed unnamed new-row check.
Charitable reading:
We checked the claim under the article's enforced-RLS, nonowner setup.
Review: We checked whether permissive failures could name individual policies. PostgreSQL combines them into an unnamed check before named restrictive checks. SQLSTATE 42501 matches. We checked whether failed permissive policies could supply a policy name. Their combined check omits names. Separate restrictive checks retain names. The executor uses SQLSTATE 42501.

Sources:
- [REL_17_11 · src/backend/rewrite/rowsecurity.c:839-843](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/rewrite/rowsecurity.c#L839-L843)
  Excerpt:
  ```text
  * Add a single WithCheckOption for all the permissive policy clauses,
		 * combining them together using OR.  This check has no policy name,
		 * since if the check fails it means that no policy granted permission
		 * to perform the update, rather than any particular policy being
		 * violated.
  ```
- [REL_17_11 · src/backend/rewrite/rowsecurity.c:863-866](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/rewrite/rowsecurity.c#L863-L866)
  Excerpt:
  ```text
  * Now add WithCheckOptions for each of the restrictive policy clauses
		 * (which will be combined together using AND).  We use a separate
		 * WithCheckOption for each restrictive policy to allow the policy
		 * name to be included in error reports if the policy is violated.
  ```
- [REL_17_11 · src/backend/utils/errcodes.txt:335-335](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/errcodes.txt#L335-L335)
  Excerpt:
  ```text
  42501    E    ERRCODE_INSUFFICIENT_PRIVILEGE                                 insufficient_privilege
  ```
- [REL_17_11 · src/backend/executor/execMain.c:2199-2202](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/execMain.c#L2199-L2202)
  Excerpt:
  ```text
  ereport(ERROR,
								(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
								 errmsg("new row violates row-level security policy for table \"%s\"",
										wco->relname)));
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F3

### F4 · Accurate · Factual · INSERT policies run before conflict detection
Location: excerpt · section “Why does an upsert fail when the row already exists?” · as fetched 2026-10-19 · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=the%20insert%20policy%20is%20checked,whether%20there%20is%20a%20conflict)
Article says:
```text
…the insert policy is checked before PostgreSQL knows whether there is a conflict…
```
What is true:
nodeModifyTable.c:1018 checks the proposed row's policies. Its conflict-index check follows at line 1064. ON CONFLICT DO NOTHING and DO UPDATE cannot bypass an INSERT-policy failure.
Charitable reading:
The claim describes policy-check order within the shown INSERT execution path.
Review: We checked whether conflict detection precedes INSERT policy checks. ExecWithCheckOptions runs before ExecCheckIndexConstraints, including the DO NOTHING path. We checked whether conflict handling could precede policy acceptance. ExecWithCheckOptions runs before ExecCheckIndexConstraints in the cited INSERT path.

Sources:
- [REL_17_11 · src/backend/executor/nodeModifyTable.c:1018-1025](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/nodeModifyTable.c#L1018-L1025)
  Excerpt:
  ```text
  if (resultRelInfo->ri_WithCheckOptions != NIL)
			ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate);

		/*
		 * Check the constraints of the tuple.
		 */
		if (resultRelationDesc->rd_att->constr)
			ExecConstraints(resultRelInfo, slot, estate);
  ```
- [REL_17_11 · src/backend/executor/nodeModifyTable.c:1063-1065](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/nodeModifyTable.c#L1063-L1065)
  Excerpt:
  ```text
  specConflict = false;
			if (!ExecCheckIndexConstraints(resultRelInfo, slot, estate,
										   &conflictTid, arbiterIndexes))
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F4

### F5 · Accurate · Factual · The shown RETURNING and conflict-target writes require SELECT policies
Location: excerpt · section “The message has four forms” · as fetched 2026-10-19 · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=RETURNING%20and%20ON%20CONFLICT%20with,to%20the%20new%20row%20too)
Article says:
```text
…RETURNING and ON CONFLICT with a conflict target apply those to the new row too…
```
What is true:
rowsecurity.c:278 adds SELECT policies as new-row checks when SELECT rights are required. create_policy.sgml:296 confirms explicit-target conflict handling. Column-reading WHERE clauses also apply SELECT filters to existing rows at rowsecurity.c:230.
Charitable reading:
RETURNING refers to the article's RETURNING id examples. Their expressions read target columns.
Review: We considered RETURNING expressions that require no target-column access. The finding explicitly covers RETURNING id and conditions checks on required SELECT rights. We considered RETURNING expressions that read no target columns. The finding limits its claim to the shown column-reading examples. Targeted conflict handling requires SELECT checks.

Sources:
- [REL_17_11 · src/backend/rewrite/rowsecurity.c:278-283](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/rewrite/rowsecurity.c#L278-L283)
  Excerpt:
  ```text
  /*
		 * Get and add ALL/SELECT policies, if SELECT rights are required for
		 * this relation (eg: when RETURNING is used).  These are added as WCO
		 * policies rather than security quals to ensure that an error is
		 * raised if a policy is violated; otherwise, we might end up silently
		 * dropping rows to be added.
  ```
- [REL_17_11 · doc/src/sgml/ref/create_policy.sgml:296-303](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/create_policy.sgml#L296-L303)
  Excerpt:
  ```text
  If an <literal>INSERT</literal> has an <literal>ON CONFLICT DO
         UPDATE</literal> clause, or an <literal>ON CONFLICT DO
         NOTHING</literal> clause with an arbiter index or constraint
         specification, then <literal>SELECT</literal>
         permissions are required on the relation, and the rows proposed for
         insertion are checked using the relation's <literal>SELECT</literal>
         policies.  If a row proposed for insertion does not satisfy the
         relation's <literal>SELECT</literal> policies, an error is thrown
  ```
- [REL_17_11 · src/backend/rewrite/rowsecurity.c:230-238](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/rewrite/rowsecurity.c#L230-L238)
  Excerpt:
  ```text
  /*
	 * Similar to above, during an UPDATE, DELETE, or MERGE, if SELECT rights
	 * are also required (eg: when a RETURNING clause exists, or the user has
	 * provided a WHERE clause which involves columns from the relation), we
	 * collect up CMD_SELECT policies and add them via add_security_quals
	 * first.
	 *
	 * This way, we filter out any records which are not visible through an
	 * ALL or SELECT USING policy.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F5

### F6 · Accurate · Factual · MERGE applies policies for the action it executes
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=No%20separate%20policy%20exists%20for%20MERGE.)
Article says:
```text
…No separate policy exists for MERGE.
```
What is true:
create_policy.sgml:743 defines no separate MERGE policy. nodeModifyTable.c:2992 checks action policies after WHEN conditions. SELECT filters can hide an existing target row before matching, so an INSERT action can encounter its unique key.
Charitable reading:
The matched-row explanation concerns the article's UPDATE action, not every possible MERGE action.
Review: We checked whether unexecuted MERGE actions trigger these checks. The executor evaluates WHEN conditions first. SELECT filtering explains hidden target rows. We checked whether MERGE applies every action's policies unconditionally. Action checks follow WHEN evaluation. SELECT filters separately determine which target rows remain visible.

Sources:
- [REL_17_11 · doc/src/sgml/ref/create_policy.sgml:743-747](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/create_policy.sgml#L743-L747)
  Excerpt:
  ```text
  No separate policy exists for <command>MERGE</command>. Instead, the policies
   defined for <command>SELECT</command>, <command>INSERT</command>,
   <command>UPDATE</command>, and <command>DELETE</command> are applied
   while executing <command>MERGE</command>, depending on the actions that are
   performed.
  ```
- [REL_17_11 · src/backend/executor/nodeModifyTable.c:2992-3001](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/nodeModifyTable.c#L2992-L3001)
  Excerpt:
  ```text
  * NOTE: We must do this after WHEN quals are evaluated, so that we
		 * check policies only when they matter.
		 */
		if (resultRelInfo->ri_WithCheckOptions && commandType != CMD_NOTHING)
		{
			ExecWithCheckOptions(commandType == CMD_UPDATE ?
								 WCO_RLS_MERGE_UPDATE_CHECK : WCO_RLS_MERGE_DELETE_CHECK,
								 resultRelInfo,
								 resultRelInfo->ri_oldTupleSlot,
								 context->mtstate->ps.state);
  ```
- [REL_17_11 · src/backend/rewrite/rowsecurity.c:230-238](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/rewrite/rowsecurity.c#L230-L238)
  Excerpt:
  ```text
  /*
	 * Similar to above, during an UPDATE, DELETE, or MERGE, if SELECT rights
	 * are also required (eg: when a RETURNING clause exists, or the user has
	 * provided a WHERE clause which involves columns from the relation), we
	 * collect up CMD_SELECT policies and add them via add_security_quals
	 * first.
	 *
	 * This way, we filter out any records which are not visible through an
	 * ALL or SELECT USING policy.
  ```
- [https://www.postgresql.org/docs/17/sql-createpolicy.html](https://www.postgresql.org/docs/17/sql-createpolicy.html)
  Excerpt:
  ```text
  No separate policy exists for MERGE
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F6

### F7 · Accurate · Factual · BEFORE triggers precede policy and NOT NULL checks
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=WITH%20CHECK%20is%20enforced%20after%20BEFORE%20triggers)
Article says:
```text
…WITH CHECK is enforced after BEFORE triggers…
```
What is true:
nodeModifyTable.c:840 runs BEFORE INSERT triggers before policy checks at line 1018. Constraint checks follow at line 1024. The modified tenant value can change policy acceptance. A policy rejection can precede the column's NOT NULL error.
Charitable reading:
The trigger changes the proposed tenant before the policy expression examines that tuple.
Review: We checked whether NOT NULL validation could precede the stated policy failure. BEFORE INSERT triggers run first, policy checks second, constraints third. We checked whether NOT NULL enforcement precedes policy rejection. BEFORE INSERT triggers run first, policy checks follow, and ExecConstraints runs afterward.

Sources:
- [REL_17_11 · src/backend/executor/nodeModifyTable.c:1018-1025](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/nodeModifyTable.c#L1018-L1025)
  Excerpt:
  ```text
  if (resultRelInfo->ri_WithCheckOptions != NIL)
			ExecWithCheckOptions(wco_kind, resultRelInfo, slot, estate);

		/*
		 * Check the constraints of the tuple.
		 */
		if (resultRelationDesc->rd_att->constr)
			ExecConstraints(resultRelInfo, slot, estate);
  ```
- [REL_17_11 · doc/src/sgml/ref/create_policy.sgml:62-67](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/ref/create_policy.sgml#L62-L67)
  Excerpt:
  ```text
  <literal>WITH CHECK</literal> expressions are enforced after
   <literal>BEFORE</literal> triggers are fired, and before any actual data
   modifications are made.  Thus a <literal>BEFORE ROW</literal> trigger may
   modify the data to be inserted, affecting the result of the security
   policy check.  <literal>WITH CHECK</literal> expressions are enforced
   before any other constraints.
  ```
- [REL_17_11 · src/backend/executor/nodeModifyTable.c:840-841](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/executor/nodeModifyTable.c#L840-L841)
  Excerpt:
  ```text
  if (!ExecBRInsertTriggers(estate, resultRelInfo, slot))
			return NULL;		/* "do nothing" */
  ```
- [https://www.postgresql.org/docs/17/sql-createpolicy.html](https://www.postgresql.org/docs/17/sql-createpolicy.html)
  Excerpt:
  ```text
  WITH CHECK expressions are enforced after BEFORE triggers are fired
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F7

### F8 · Accurate · Factual · Verified accurate: “…Check pg_policies for the command and the role, then the row's tenant_id…”
Location: excerpt · section “The message has four forms” · as fetched 2026-10-19 · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=Check%20pg_policies%20for%20the%20command,role%2C%20then%20the%20row%27s%20tenant_id)
Article says:
```text
…Check pg_policies for the command and the role, then the row's tenant_id…
```
What is true:
system_views.sql:95–103 exposes cmd, qual, and with_check. It maps command codes to SELECT, INSERT, UPDATE, DELETE, and ALL. rowsecurity.c:921–928 accepts PUBLIC and checks inherited role privileges.
Review: E-25 records three diagnostic fields, not every requested field. E-26 provides only the view description. We narrowed the endorsement to those fields and the recorded role checks.

Sources:
- [REL_17_11 · src/backend/catalog/system_views.sql:95-103](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/catalog/system_views.sql#L95-L103)
  Excerpt:
  ```text
  CASE pol.polcmd
            WHEN 'r' THEN 'SELECT'
            WHEN 'a' THEN 'INSERT'
            WHEN 'w' THEN 'UPDATE'
            WHEN 'd' THEN 'DELETE'
            WHEN '*' THEN 'ALL'
        END AS cmd,
        pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS qual,
        pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS with_check
  ```
- [REL_17_11 · doc/src/sgml/system-views.sgml:1811-1813](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/system-views.sgml#L1811-L1813)
  Excerpt:
  ```text
  <para>
   The view <structname>pg_policies</structname> provides access to
   useful information about each row-level security policy in the database.
  ```
- [REL_17_11 · src/backend/rewrite/rowsecurity.c:921-928](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/rewrite/rowsecurity.c#L921-L928)
  Excerpt:
  ```text
  /* Quick fall-thru for policies applied to all roles */
	if (roles[0] == ACL_ID_PUBLIC)
		return true;

	for (i = 0; i < ARR_DIMS(policy_roles)[0]; i++)
	{
		if (has_privs_of_role(user_id, roles[i]))
			return true;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F8

### F9 · Accurate · Factual · Verified accurate: “A bulk import under row-level security is INSERT statements, or a role that bypasses the…”
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=A%20bulk%20import%20under%20row%2Dlevel,role%20that%20bypasses%20the%20policy.)
Article says:
```text
A bulk import under row-level security is INSERT statements, or a role that bypasses the policy.
```
What is true:
copy.c:228–232 contains the COPY FROM rejection for row-level security. The error recommends INSERT statements. This range does not establish which roles avoid that rejection.
Review: E-27 contains the rejection and INSERT hint. It omits the enclosing RLS guard and role-exemption logic. We removed the exemption assertion from the evidence-backed conclusion.

Sources:
- [REL_17_11 · src/backend/commands/copy.c:228-232](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/commands/copy.c#L228-L232)
  Excerpt:
  ```text
  if (is_from)
				ereport(ERROR,
						(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
						 errmsg("COPY FROM not supported with row-level security"),
						 errhint("Use INSERT statements instead.")));
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F9

### F10 · Accurate · Factual · Ordinary table owners bypass RLS unless FORCE applies
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=If%20your%20application%20connects%20as,this%20error%20is%20the%20problem.)
Article says:
```text
If your application connects as the owner, the absence of this error is the problem.
```
What is true:
rls.c:91 documents the ordinary owner exemption and FORCE exception. Under the article's setup, connecting as the owner can admit a row that app would fail.
Charitable reading:
The immediately preceding sentences distinguish ordinary owner access from FORCE ROW LEVEL SECURITY.
Review: We considered FORCE, BYPASSRLS, and internal integrity checks. The finding limits its conclusion to ordinary owners under the article's setup. We considered FORCE and BYPASSRLS exceptions. The finding explicitly concerns ordinary owners and preserves the FORCE qualification stated beside the article quote.

Sources:
- [REL_17_11 · src/backend/utils/misc/rls.c:91-93](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/rls.c#L91-L93)
  Excerpt:
  ```text
  * Table owners generally bypass RLS, except if the table has been set (by
	 * an owner) to FORCE ROW SECURITY, and this is not a referential
	 * integrity check.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F10

### F11 · Accurate · Factual · Missing and empty tenant settings produce a NULL comparison
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=An%20empty%20or%20missing%20setting%20makes%20the%20comparison%20NULL)
Article says:
```text
An empty or missing setting makes the comparison NULL…
```
What is true:
guc_funcs.c:834 returns NULL for an absent setting with missing_ok. NULLIF converts an empty setting to NULL. func.sgml:645 confirms that ordinary comparisons with NULL yield NULL. The article's expression handles both cases as stated.
Charitable reading:
The comparison includes the article's NULLIF wrapper around current_setting.
Review: We distinguished an absent setting from an empty string. missing_ok handles absence, and the article's NULLIF handles emptiness before comparison. We checked whether an empty string would instead cause an integer-cast error. The article's NULLIF wrapper converts it to NULL first.

Sources:
- [REL_17_11 · src/backend/utils/misc/guc_funcs.c:834-839](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/utils/misc/guc_funcs.c#L834-L839)
  Excerpt:
  ```text
  /* return NULL if no such variable */
	if (varval == NULL)
		PG_RETURN_NULL();

	/* Convert to text */
	PG_RETURN_TEXT_P(cstring_to_text(varval));
  ```
- [REL_17_11 · doc/src/sgml/func.sgml:19860-19862](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/func.sgml#L19860-L19862)
  Excerpt:
  ```text
  The <function>NULLIF</function> function returns a null value if
   <replaceable>value1</replaceable> equals <replaceable>value2</replaceable>;
   otherwise it returns <replaceable>value1</replaceable>.
  ```
- [REL_17_11 · doc/src/sgml/func.sgml:645-646](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/doc/src/sgml/func.sgml#L645-L646)
  Excerpt:
  ```text
  Ordinary comparison operators yield null (signifying <quote>unknown</quote>),
    not true or false, when either input is null.  For example,
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F11

### F12 · Accurate · Factual · Run transaction-local diagnostics before the failing statement
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=run%20in%20the%20same%20transaction,before%20the%20write%20that%20fails)
Article says:
```text
…run in the same transaction just before the write that fails…
```
What is true:
postgres.c:1139 rejects ordinary commands while the transaction remains aborted. Running the diagnostic SELECT statements before the failing write preserves access to that transaction's tenant setting.
Charitable reading:
The diagnostic concerns an explicit transaction that has not recovered through a savepoint or rollback.
Review: We considered savepoint recovery and transaction-exit commands. The finding concerns ordinary diagnostics while the transaction remains aborted, which postgres.c rejects. We considered recovery through rollback or savepoints. The finding concerns commands issued while the transaction remains aborted. PostgreSQL rejects those diagnostic SELECT statements.

Sources:
- [REL_17_11 · src/backend/tcop/postgres.c:1139-1145](https://github.com/postgres/postgres/blob/083ac033419f690758508e08c1736089384bbee8/src/backend/tcop/postgres.c#L1139-L1145)
  Excerpt:
  ```text
  if (IsAbortedTransactionBlockState() &&
			!IsTransactionExitStmt(parsetree->stmt))
			ereport(ERROR,
					(errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION),
					 errmsg("current transaction is aborted, "
							"commands ignored until end of transaction block"),
					 errdetail_abort()));
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F12

### F13 · Accurate · Factual · ON CONFLICT still checks INSERT policies
Location: excerpt · section “Why does an upsert fail when the row already exists?” · as fetched 2026-10-19 · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=regardless%20of%20whether%20or%20not%20they%20end%20up%20being%20inserted)
Article says:
```text
…regardless of whether or not they end up being inserted…
```
What is true:
PostgreSQL 17 CREATE POLICY documents INSERT policy checks for every proposed row. Conflict handling does not exempt existing rows.
Charitable reading:
The statement concerns rows proposed for insertion, including rows later handled by conflict actions.
Review: We checked the quotation's surrounding documentation for conflict-action exceptions. PostgreSQL 17 explicitly applies INSERT checks to every proposed row. We checked the documentation's proposed-row qualification. INSERT policy checks apply even when conflict handling prevents insertion. The finding does not verify execution history.

Sources:
- [https://www.postgresql.org/docs/17/sql-createpolicy.html](https://www.postgresql.org/docs/17/sql-createpolicy.html)
  Excerpt:
  ```text
  regardless of whether or not they end up being inserted
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F13

### F14 · Accurate · Factual · RETURNING id adds a SELECT policy check
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=must%20satisfy%20the%20relation%E2%80%99s%20SELECT%20policies)
Article says:
```text
…must satisfy the relation’s SELECT policies…
```
What is true:
PostgreSQL 17 CREATE POLICY requires returned inserted rows to satisfy SELECT policies. The article quotes that requirement accurately.
Charitable reading:
The examples return id, a column of the protected relation.
Review: We considered constant RETURNING expressions. The finding's title and stated scope concern RETURNING id, which reads the protected relation. We tested the scope against RETURNING expressions without target-column references. The finding specifically covers RETURNING id, which the documented SELECT-policy requirement supports.

Sources:
- [https://www.postgresql.org/docs/17/sql-createpolicy.html](https://www.postgresql.org/docs/17/sql-createpolicy.html)
  Excerpt:
  ```text
  must satisfy the relation's SELECT policies
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F14

### F15 · Accurate · Factual · Targeted ON CONFLICT checks SELECT policies
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=the%20rows%20proposed%20for%20insertion,using%20the%20relation%E2%80%99s%20SELECT%20policies)
Article says:
```text
…the rows proposed for insertion are checked using the relation’s SELECT policies…
```
What is true:
PostgreSQL 17 documents SELECT checks for DO UPDATE and DO NOTHING with an arbiter index or constraint specification.
Charitable reading:
The article limits DO NOTHING's additional check to statements with a conflict target.
Review: We checked whether the finding incorrectly includes bare DO NOTHING. It preserves the documentation's arbiter specification condition. We checked whether the finding extends SELECT checks to bare DO NOTHING. It preserves the documentation's arbiter-specification qualification.

Sources:
- [https://www.postgresql.org/docs/17/sql-createpolicy.html](https://www.postgresql.org/docs/17/sql-createpolicy.html)
  Excerpt:
  ```text
  the rows proposed for insertion are checked using the relation's SELECT policies
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F15

### F18 · Accurate · Factual · The matrix contains 11 writes across 5 setups
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=eleven%20writes%20against%20five%20policy%20setups)
Article says:
```text
…eleven writes against five policy setups…
```
What is true:
The full matrix uses A, B, C, D and F. Its 11 numbered writes give 55 displayed outcomes. Setup E belongs to the additional tests.
Charitable reading:
The 5 setups refer to the full matrix. Setup E and its variants receive additional tests.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We counted 11 matrix rows and columns A, B, C, D, F. Setup E belongs to additional tests. The finding verifies 55 displayed outcomes, not execution history. We counted A, B, C, D and F as five matrix setups. Eleven numbered writes produce 55 displayed outcomes. Setup E belongs to the additional tests.

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F18

### F19 · Accurate · Factual · The stated starting population totals 15 rows
Location: Article · exact quote · [open in article](https://now-next.nl/en/insights/postgresql-new-row-violates-row-level-security-policy#:~:text=three%20tenants%20with%20five%20rows%20each)
Article says:
```text
…three tenants with five rows each…
```
What is true:
The stated population is 15 rows (derived: 3 tenants × 5 rows per tenant). The later starting-row count agrees.
Charitable reading:
The 15-row claim describes the initial population before each rolled-back write.
Explanation: Checked for internal consistency: the evidence is the article itself.
Review: We recalculated the population: 3 tenants × 5 rows per tenant equals 15 rows. The finding checks stated arithmetic without claiming independent execution evidence. We recalculated 3 tenants multiplied by 5 rows per tenant. The result matches the stated 15-row population. The finding expressly limits verification to arithmetic.

Finding URL: https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb#F19

## Notes (not graded) (0)

None.

## Withdrawn findings (0)

None.

## Section checks

- Test setup · A · 1 verified-accurate · 100% of claims (15 of 15, plus 4 that need data we do not have)
- Message forms · A · 1 verified-accurate · 50% of claims (1 of 2, plus 8 that need data we do not have) provisional
- Decision tree · B+ · 1 misleading · 66% of claims (6 of 9, plus 2 that need data we do not have)
- Write results · A · 1 verified-accurate · 100% of claims (5 of 5, plus 59 that need data we do not have)
- Upsert and MERGE · A · 3 verified-accurate · 100% of claims (6 of 6, plus 2 that need data we do not have)
- SELECT policies on writes · A · 3 verified-accurate · 100% of claims (4 of 4, plus 2 that need data we do not have)
- Cross-tenant unique values · B+ · 1 inaccuracy · 50% of claims (2 of 4, plus 7 that need data we do not have) provisional
- Other outcomes · A · 3 verified-accurate · 75% of claims (6 of 8, plus 11 that need data we do not have)
- Database diagnostics · A · 3 verified-accurate · 75% of claims (9 of 12)

## Claim coverage

- Introduction: 4 of 7 Postgres claims checked, plus 6 that need data we do not have; not counted: 4 not a claim; not checked: 3 for other reasons
- Error meaning: 6 of 7 Postgres claims checked, plus 3 that need data we do not have; not counted: 3 duplicate, 1 not a claim; not checked: 1 for other reasons
- Test setup: 15 of 15 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 not a claim
- Message forms: 1 of 2 Postgres claims checked, plus 8 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
- Decision tree: 6 of 9 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 product or opinion, 2 duplicate, 1 not a claim; not checked: 3 for other reasons
- Write results: 5 of 5 Postgres claims checked, plus 59 that need data we do not have; not counted: 1 not a claim
- Upsert and MERGE: 6 of 6 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim
- SELECT policies on writes: 4 of 4 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 duplicate, 1 not a claim
- Cross-tenant unique values: 2 of 4 Postgres claims checked, plus 7 that need data we do not have; not counted: 1 product or opinion, 1 duplicate, 2 not a claim; not checked: 2 for other reasons
- Other outcomes: 6 of 8 Postgres claims checked, plus 11 that need data we do not have; not counted: 1 duplicate, 3 not a claim; not checked: 2 for other reasons
- Database diagnostics: 9 of 12 Postgres claims checked; not counted: 1 product or opinion, 1 duplicate, 3 not a claim; not checked: 3 for other reasons
- Measurement scope: 1 of 2 Postgres claims checked; not counted: 1 product or opinion, 1 duplicate, 8 not a claim; not checked: 1 for other reasons
- Publisher and related reading: no checkable claims; not counted: 3 product or opinion, 9 not a claim

## What we did not check

- We did not reproduce the PostgreSQL 17.11 measurements or verify the original transaction logs.
- We did not evaluate the tenant_id index position against application workloads.
- We did not reproduce the article's result matrix or additional restrictive-policy tests.
- We could not verify the PostgreSQL 17.11 container or the reported execution date.
- We did not check every diagnostic, policy exception, or linked troubleshooting article against primary evidence.
- We did not establish release changes after the article's publication.
- We could not retrieve the services page.
- We did not reproduce the measurements the article displays.
- We could not compare the summarized writes with complete SQL statements and execution transcripts.
- Section “Message forms”: we checked 1 of 10 checkable claims.
- Section “Cross-tenant unique values”: we checked 2 of 11 checkable claims.
- Section “Introduction”: we checked 4 of 13 checkable claims.
- Section “Measurement scope”: we checked 1 of 2 checkable claims.
- We could not decide whether the article depends on finding F17.

## Notes

- A- — the findings address the article's main subject. What we did not check is listed below. We checked PostgreSQL 17.11 policy enforcement, message forms, write behavior, and diagnostic advice against source and documentation.
- We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.
- Average of 4 axes: 3.65 · result A-
- Some explanatory text is not shown in this edition; the grade and findings are complete.
- Some checks did not happen for this edition, and each one we know of is listed above.
- Checked against: github.com/postgres/postgres REL_17_11 at commit 083ac033419f690758508e08c1736089384bbee8 (pinned target); github.com/pgbouncer/pgbouncer pgbouncer_1_26_1 at commit f03e9bf263d7ccd5d1d152a61811bf3258dd6b87 (pinned target); https://now-next.nl/en/ (fetched 2026-10-19T07:59:20.397281Z); https://now-next.nl/en/about/ (fetched 2026-10-19T07:59:22.117624Z); https://now-next.nl/en/insights/ (fetched 2026-10-19T07:59:21.319882Z); https://now-next.nl/en/insights/django-postgresql-row-level-security-tenant/ (fetched 2026-10-19T07:59:32.001511Z); https://now-next.nl/en/insights/drizzle-postgresql-row-level-security-tenant/ (fetched 2026-10-19T07:59:32.918757Z); https://now-next.nl/en/insights/pgbouncer-row-level-security-tenant-context/ (fetched 2026-10-19T07:59:25.512111Z); https://now-next.nl/en/insights/postgresql-debug-row-level-security-no-rows/ (fetched 2026-10-19T07:59:26.366581Z); https://now-next.nl/en/insights/postgresql-infinite-recursion-detected-in-policy-for-relation/ (fetched 2026-10-19T07:59:27.249678Z); https://now-next.nl/en/insights/postgresql-permission-denied-for-table-schema-sequence/ (fetched 2026-10-19T07:59:23.821913Z); https://now-next.nl/en/insights/postgresql-rls-using-vs-with-check-writes/ (fetched 2026-10-19T07:59:24.681954Z); https://now-next.nl/en/insights/postgresql-unique-constraint-per-tenant-soft-delete/ (fetched 2026-10-19T07:59:23.025969Z); https://www.postgresql.org/docs/17/sql-copy.html (fetched 2026-10-19T07:59:29.787137Z); https://www.postgresql.org/docs/17/sql-createpolicy.html (fetched 2026-10-19T07:59:28.570227Z).
- Article captured 2026-10-19T07:59:09.250782Z · SHA-256 3a875ee1ebfe302b8704104ea58de04c867d7b01fe372456b2951b49bf714151 · Text extracted from the article's HTML.
- Policy SHA-256 dbb4541317ecd9b40b53a6da5d64006a3f30d4e4d2a71cbeda5f6dd990d0b25c · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not reproduce the PostgreSQL 17.11 measurements or verify the original transaction logs.
- We could not compare the summarized writes with complete SQL statements and execution transcripts.
- We could not verify the PostgreSQL 17.11 container or the reported execution date.
- We did not evaluate the tenant_id index position against application workloads.
- We did not check every diagnostic, policy exception, or linked troubleshooting article against primary evidence.
- We did not establish release changes after the article's publication.
- We could not retrieve the services page.
- The article gives a date without a time. We list that date at midnight UTC.
- source: pgbouncer names no release in the article, so it was read at 1.26.1, the latest at fetch time
- withheld: F16 — this finding failed a check this edition requires.
- review: the findings were written by one model and reviewed independently by a different model.
- 2026-10-27: Regraded under the current grading rules: the letter is the average of the axis letters, with every cap stated under it.
- 3 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, 2 pinned source trees, and 13 fetched pages.
- 15 survived · 2 weakened · 0 withdrawn.

## Revision history

- [Revision 1](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb?v=1) · B · audit version not recorded
  Details unavailable.
  ElephantSeal: B.
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb?v=23) · 2026-10-11 06:38 UTC · A- · audit version not recorded · regrade version not recorded
  Same article text, re-audited. 11 accurate · 2 wrong · 0 caveats.
  ElephantSeal: A-.
  Changes: Details unavailable.
- [Revision 3](https://pgtrue.postgres.ai/shared/brief/c8b29788-6fe2-48e5-8db9-35fe26e475eb?v=27) · this page · 2026-10-19 07:59 UTC · A- · audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)
  Article text changed. 15 accurate · 2 wrong · 0 caveats.
  ElephantSeal: A-.
  Changes: No longer reported: “All four tell tenant 2 that the slug is taken, and three of them that it is not its own…”; “…three of them that it is not its own…”. New: F17 “Plain INSERT does not disclose which tenant owns the duplicate slug” (false); F1 “The duplicate-key branch can misdiagnose a missing SELECT policy” (misleading).

Updated your article? Request a correction. A new edition appears at this address.