Skip to main content
deleted 39 characters in body
Source Link
vvvvv
  • 32.9k
  • 19
  • 70
  • 103

I'm trying to create a Postgres database for the first time. So this is probably a stupid question.

I assigned basic read-only permissions to the DB role that must access the database from my PHP scripts, and I have a curiosity: If I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to also execute this?

GRANT USAGE ON SCHEMA schema TO role;

From the documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what is GRANT USAGE ON SCHEMA used for? And what does the documentation mean exactly with "assuming that the objects' own privilege requirements are also met"?

I'm trying to create a Postgres database for the first time. So this is probably a stupid question.

I assigned basic read-only permissions to the DB role that must access the database from my PHP scripts, and I have a curiosity: If I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to also execute this?

GRANT USAGE ON SCHEMA schema TO role;

From the documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what is GRANT USAGE ON SCHEMA used for? And what does the documentation mean exactly with "assuming that the objects' own privilege requirements are also met"?

I'm trying to create a Postgres database for the first time.

I assigned basic read-only permissions to the DB role that must access the database from my PHP scripts, and I have a curiosity: If I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to also execute this?

GRANT USAGE ON SCHEMA schema TO role;

From the documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what is GRANT USAGE ON SCHEMA used for? And what does the documentation mean exactly with "assuming that the objects' own privilege requirements are also met"?

Grammar fixes
Source Link
Oliver Salzburg
  • 22.2k
  • 22
  • 99
  • 146

What does GRANT USAGE ON SCHEMA exactly do exactly?

I'm trying to create a Postgres database for the first time a Postgres database, so. So this is probably a stupid question. 

I assigned basic read-only permissions to the dbDB role that must access the database from my phpPHP scripts, and I have a curiosity: ifIf I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to execute also execute this?

GRANT USAGE ON SCHEMA schema TO role;

?

From the documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what is GRANT USAGE ON SCHEMA is used for? And what does the documentation meansmean exactly with "assuming that the objects' own privilege requirements are also met"?

What GRANT USAGE ON SCHEMA exactly do?

I'm trying to create for the first time a Postgres database, so this is probably a stupid question. I assigned basic read-only permissions to the db role that must access the database from my php scripts, and I have a curiosity: if I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to execute also

GRANT USAGE ON SCHEMA schema TO role;

?

From documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what GRANT USAGE ON SCHEMA is used for? And what does the documentation means exactly with "assuming that the objects' own privilege requirements are also met"?

What does GRANT USAGE ON SCHEMA do exactly?

I'm trying to create a Postgres database for the first time. So this is probably a stupid question. 

I assigned basic read-only permissions to the DB role that must access the database from my PHP scripts, and I have a curiosity: If I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to also execute this?

GRANT USAGE ON SCHEMA schema TO role;

From the documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what is GRANT USAGE ON SCHEMA used for? And what does the documentation mean exactly with "assuming that the objects' own privilege requirements are also met"?

added 121 characters in body
Source Link
Marco Sulla
  • 16k
  • 14
  • 73
  • 110

I'm trying to create for the first time a Postgres database, so this is probably a stupid question. I assigned basic read-only permissions to the db role that must access the database from my php scripts, and I have a curiosity: if I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to execute also

GRANT USAGE ON SCHEMA schema TO role;

?

From documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what GRANT USAGE ON SCHEMA is used for? And what does the documentation means exactly with "assuming that the objects' own privilege requirements are also met"?

I'm trying to create for the first time a Postgres database, so this is probably a stupid question. I assigned basic read-only permissions to the db role that must access the database from my php scripts, and I have a curiosity: if I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to execute also

GRANT USAGE ON SCHEMA schema TO role;

?

From documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what GRANT USAGE ON SCHEMA is used for?

I'm trying to create for the first time a Postgres database, so this is probably a stupid question. I assigned basic read-only permissions to the db role that must access the database from my php scripts, and I have a curiosity: if I execute

GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;

is there any need to execute also

GRANT USAGE ON SCHEMA schema TO role;

?

From documentation:

USAGE: For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema.

I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what GRANT USAGE ON SCHEMA is used for? And what does the documentation means exactly with "assuming that the objects' own privilege requirements are also met"?

Source Link
Marco Sulla
  • 16k
  • 14
  • 73
  • 110
Loading