Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Privileges granted to an account or role through the security mechanism of an operating system, database manager or other system.
4
votes
Limit access to specific database only, and restrict access to system tables
You can achieve this goal by revoking certain privileges. You might have the reasons to do so - the only scenario where I'd start thinking about it is multi-tenancy. Still, in this case, it is bette …
4
votes
Relation does not exist for some users
What you see typically happens when the non-privileged user doesn't have schema level privileges. In this case, they cannot list the objects inside the given schema - with the command you tried. See …
1
vote
Restrict access to new database by default
I think you cannot do this using only the tools PostgreSQL offers.
On one hand, there are no default privileges, as you noticed. The REVOKE command issued on a template DB (template1 in most cases) …
2
votes
Accepted
Allow access to specific user only
You will have to edit your pg_hba.conf file. If you really want to reduce possible access to a single user (see the note below), you will need the following lines, and only these:
# TYPE DATABASE …
1
vote
Accepted
MySQL '%' hostname wildcard
Looking up the documentation, two things to mention:
not sure whether a space is allowed before @ (not declared explicitly, but the user string takes the user_name@host_name form - and since this is …
4
votes
How do I GRANT for all tables across all schemas
If you need to do this only once, the quickest way is probably the following.
Find all the schemas you want to touch by querying, for example, the pg_namespace system catalog:
SELECT nspname
FROM p …
11
votes
ALTER DEFAULT PRIVILEGES - permission denied
The problem here is the ALTER DEFAULT PRIVILEGES statement you issued will apply only to tables that are created by user_name:
You can change default privileges only for objects that will be created …
4
votes
Accepted
Role, whose name doesn't match database name, can't access the database
As it sounds, the tables (not necessary the database) is owned by the app user. This is what the documentation tells about this:
If the "Access privileges" column is empty for a given object, it …
1
vote
Grant CREATE SCHEMA (only) to users
Postgres is quite good at doing such things, this is one reason I like it.
You can create an arbitrarily complex role hierarchy, but for our purposes a simple one will be enough:
CREATE ROLE student …
8
votes
how do you revoke create table from a user on postgresql 9.4?
According to the documentation, what one needs for creating tables in a schema is CREATE on that schema. This you think you revoked, but as you experience it didn't really happen - the only plausible …
1
vote
Accepted
Number of virtual tables that specified user is able to write queries in PostgreSQL
I try to answer your question - to be correct, I try to answer the question I think you've asked (see the comments). Until then I'll assume that a virtual table is simply a table and you want to coun …
4
votes
Accepted
PostgreSQL, How to keep only one schema?
The documentation of GRANT says the following:
CREATE
For databases, allows new schemas to be created within the database.
For schemas, allows new objects to be created within the schema. To ren …
4
votes
Change built-in default privileges in PostgreSQL?
The CONNECT privilege for PUBLIC looks somewhat special:
\l
template1 | postgres | UTF8 | Hungarian, Hungary | Hungarian, Hungary | postgres=CTc/postgres
That is, user test (which is the memb …
6
votes
Reg: Default Privileges on PostgreSQL Schemas
arwdDxt/bob ↵│
│ │ │ alice=r/bob │
As you can see, despite creating the table in alice's schema where she set the default privileges, bob's table doesn't have all those permissions …
8
votes
Accepted
What is the equivalent of SQL Server's db_datareader/db_datawriter in PostgreSQL?
There is no builtin role like that in PostgreSQL. However, you can set up one:
CREATE ROLE db_datawriter;
After this, you have to assign write privileges (usually INSERT, UPDATE, DELETE, maybe TRU …