truncate table restart identity for non-owner - Mailing list pgsql-general

From Bastien Bodart
Subject truncate table restart identity for non-owner
Date
Msg-id 50dd5534-05aa-20c5-06a8-188654132009@esnah.com
Whole thread Raw
List pgsql-general
Hi,

It's currently impossible for a non-owner user to do 'TRUNCATE table
RESTART IDENTITY;' even with ALL privileges on both the table and the
sequences because of the implied ALTER SEQUENCE RESTART operation.

Why does it work that way instead of using 'SELECT setval('foo', 1,
false);' which is equivalent and allowed for users with UPDATE privilege?

Bastien


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Generic way to test input arguments
Next
From: Edilmar LISTAS
Date:
Subject: Problem changing default data_directory in PG 9.6 + CentOS6