Skip to content

Enhance error message for neon_superuser check #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: REL_16_STABLE_neon
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Enhance error message for neon_superuser check
  • Loading branch information
reshke authored Aug 23, 2024
commit 15a0e9b3660f205c343758588fc947bb563ddf10
4 changes: 2 additions & 2 deletions src/backend/commands/publicationcmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)
if (stmt->for_all_tables && !superuser() && !is_neon_superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser to create FOR ALL TABLES publication")));
errmsg("must be superuser or have privileges of neon_superuser to create FOR ALL TABLES publication")));

rel = table_open(PublicationRelationId, RowExclusiveLock);

Expand Down Expand Up @@ -836,7 +836,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)
if (schemaidlist != NIL && !superuser() && !is_neon_superuser())
ereport(ERROR,
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser to create FOR TABLES IN SCHEMA publication"));
errmsg("must be superuser or have privileges of neon_superuser to create FOR TABLES IN SCHEMA publication"));

if (relations != NIL)
{
Expand Down