4

Running drop owned by <username>; gives me ERROR: permission denied to drop objects. I can login/create/insert/update/alter etc fine.

Created the db and role like so:

  1. sudo psql -U postgres
  2. CREATE USER <username> WITH PASSWORD '<password>';
  3. CREATE DATABASE <dbname> OWNER <username> ;

Looking up the problem, these are some of the things I ran that did not solve the issue:

  • GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO <username>;
  • GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO <username>;
  • GRANT ALL PRIVILEGES ON DATABASE <dbname> to <username>;
  • GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO <username>;
Robert C. Holland
  • 1,651
  • 4
  • 24
  • 57

1 Answers1

6

Only the owner, or a superuser, can drop an object. There is no privilege which allows dropping of an object, hence this is not something which can be granted to others.

A. Scherbaum
  • 809
  • 4
  • 8