Re: Assistance needed for the query execution in non-public schema

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Sasmit Utkarsh <utkarshsasmit(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Assistance needed for the query execution in non-public schema
Date: 2024-04-16 11:26:22
Message-ID: CAApHDvpPcgdAczFntx-WYFDvvSWjZca3Ckmz6cohf1ELFVsKAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 16 Apr 2024 at 23:00, Sasmit Utkarsh <utkarshsasmit(at)gmail(dot)com> wrote:
> msshctd=> SELECT setval(pg_get_serial_sequence('mqa_flfo_cstr', 'id'), coalesce(MAX(id), 1)) from mqa_flfo_cstr;
> ERROR: permission denied for sequence mqa_flfo_cstr_id_seq
> msshctd=> SELECT setval(pg_get_serial_sequence('mqa_ffp_nval', 'id'), coalesce(MAX(id), 1)) from mqa_ffp_nval;
> ERROR: permission denied for sequence mqa_ffp_nval_id_seq

> GRANT USAGE, ALTER ON SEQUENCE mqa_flfo_cstr_id_seq TO shc_uadmin;
> ERROR: unrecognized privilege type "alter" SQL state: 42601

According to our documentation for setval():

"This function requires UPDATE privilege on the sequence."

https://www.postgresql.org/docs/current/functions-sequence.html

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2024-04-16 11:28:51 Re: Assistance needed for the query execution in non-public schema
Previous Message Sasmit Utkarsh 2024-04-16 11:00:09 Assistance needed for the query execution in non-public schema