0

When I try to CREATE Script on a database I want to use, there is no CREATE Script item in the context menu. No CREATE Script option But CREATE Script looks fine on another database. I can select it and it works fine. with CREATE Script option Similarly, CREATE Script in the Object menu looks fine when I'm on the other database, but is disabled when I'm on the one that I want.

Is this just some permissions that I don't have on the main database?

My user role is:

CREATE USER [redacted] WITH
  LOGIN
  NOSUPERUSER
  INHERIT
  NOCREATEDB
  NOCREATEROLE
  NOREPLICATION;

GRANT [redacted], [redacted] TO [redacted];

I'm using pgAdmin 4 version 1.6 on Mac OS X El Capitan v 10.11.6.

1 Answer 1

1

This CREATE Script option won't display in the context menu if you are connecting to the server with a user that does not have the SUPERUSER privilege or which does not have the CREATEDB privilege.

6
  • ...does that mean I can't run a query? I don't want to add or drop tables, I just want to run something like select this, that from some_table ... surely there's a way I can do that without having SUPERUSER or CREATEDB? I'm assuming there's some really obvious thing here that I'm not seeing... Nov 3, 2017 at 8:04
  • ...or is 'CREATE Script' not the right command to simply write a select query? Nov 3, 2017 at 8:05
  • 1
    CREATE Script will open query tool with the SQL shown on main SQL tab, It is helpful creating same database objects, For example let say if you have Database_1 and you want to create Database_2 with the same options/parameters as Database_1 you can use this option, for SELECT operation, you will see another context menu option which will look like SELECT Script when you right click on either Table or View objects.
    – Murtuza Z
    Nov 3, 2017 at 8:58
  • FYI, Newer version of pgAdmin4 is now available which is pgAdmin4 v2.0 if you are interested :)
    – Murtuza Z
    Nov 3, 2017 at 9:00
  • 1
    Thanks @n33rma for your feedback, I've downloaded v2.0 but still can't see SELECT Script anywhere. Then again, I can't see any tables or views inside pg_default or pg_global, so perhaps that's my problem... Nov 4, 2017 at 12:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.