… option cannot be granted back to your own grantor

SQLSTATE 0LP01 condition invalid_grant_operation class 0L — Invalid Grantor severity ERROR
Reproduced & verified on PostgreSQL 14.23, 15.18, 16.14, 17.10 and 18.4 — identical message on every version.
Last reviewed 3 Jun 2026 · Reproduced live with the SQL on this page.

Symptoms

A statement failed with SQLSTATE 0LP01 (invalid_grant_operation), reported at severity ERROR. This is a Invalid Grantor condition: PostgreSQL emits the message … option cannot be granted back to your own grantor.

What the server log shows

ERROR:  … option cannot be granted back to your own grantor

Why PostgreSQL raises this

PostgreSQL raises this error from the area indicated by its SQLSTATE class. The condition name pinpoints the specific rule that was violated.

As described in PostgreSQL’s Appendix A PostgreSQL Error Codes, SQLSTATE 0LP01 carries the condition name invalid_grant_operation in class Invalid Grantor. (Paraphrased — see the linked reference for the exact wording.)

Common causes

How to fix it

  1. Use the SQLSTATE condition name to identify the exact rule.
  2. Correct the offending input, object, or state and retry.
  3. See the linked full SQLSTATE reference for detailed guidance.

Version applicability

This message text is present in PostgreSQL 16, 17, 18, 19. It was introduced around PostgreSQL 16; earlier releases do not emit this exact text.

Related & next steps

Reference: PostgreSQL Appendix A PostgreSQL Error Codes.