ERROR: permission denied to create extension "uuid-ossp" suggest:Must be superuser to create this extension. [ERROR:0, SQLSTATE:42501], while trying to run this SQL script:
error details:
but there is no "default" database.
I use postgresql9.6.9.
Related
I have a problem with extension creating. I run following code:
CREATE EXTENSION IF NOT EXISTS dblink WITH SCHEMA pg_catalog;
And then I receive next error:
ERROR: permission denied to create "pg_catalog.dblink_pkey_results"
DETAIL: System catalog modifications are currently disallowed.
So, I haven't got thought about what I need to do in these case...
I am trying to run select query on one of the objects(dba_profiles) in postgres and getting an error as 'SQL: Database error ERROR: permission denied for view dba_profiles' and upon trying to grant permission for the same to my user, it is throwing an error as follows :
Command is - sv=> GRANT SELECT ON TABLE dba_profiles TO "MY_USER";
ERROR: permission denied for table dba_profiles
So, is there any other command to grant permission to this table by not getting into superuser mode and staying in normal mode. Or is there any equivalent of it which can directly be used in postgres? Help much appreciated.
Thanks in advance,
Rohit
I've got a Postgres database and user I've created on Google Cloud SQL.
I'm trying to install the postgis extension for that user:
myuser=> CREATE EXTENSION postgis;
ERROR: permission denied to create extension "postgis"
HINT: Must be superuser to create this extension.
as you can see, it won't allow me to create the extension for this user, so I attempted to make this user a superuser from the postgres role:
postgres=> ALTER USER myuser WITH SUPERUSER;
ERROR: must be superuser to alter superusers
and I get the following error. This is because Google Cloud SQL does not allow the SUPERUSER role for any postgres accounts according to: https://cloud.google.com/sql/docs/postgres/users.
So I'm in this weird state of purgatory that I need to add this extension, but can't.
Any tips on how to proceed?
It looks like creating a new user through the API (or the console) will give it the proper permissions, at least according to the prompt when trying to add additional users through the console:
I was trying to implement autonomous transaction in Postgres by using pg_background extension. Although it is installed, I can't call the function pg_background_launch.
Command CREATE EXTENSION pg_background returns error ERROR: extension "pg_background" already exists, so I know it already exists.
But when I run query SELECT pg_background_launch('SELECT 1'); it returns error ERROR: permission denied for function pg_background_launch
Any idea, what did I miss? Is it needed to grant some privileges? In the documentation here https://github.com/vibhorkum/pg_background, there is nothing more done after creating the extension.
You need the user who created the extension to grant out access to the functions to other users:
GRANT ALL ON FUNCTION public.pg_background_launch(sql text, queue_size integer) to some_user;
GRANT ALL ON FUNCTION public.pg_background_result(pid integer) to some_user;
GRANT ALL ON FUNCTION public.pg_background_detach(pid integer) to some_user;
When using kettle greenplum bulkloader and ERROR: permission denied: no privilege to create a readable gpfdist(s) external tableenter image description here
The user running the program in the database needs to have CREATEEXTTABLE privileges. You can do this with: ALTER ROLE CREATEEXTTABLE (type='readable').