Re: Upgraded, now permission denied.
От | Jason Whitener |
---|---|
Тема | Re: Upgraded, now permission denied. |
Дата | |
Msg-id | CAP78pDJ2FbC9Cu47L-T2qaq88ETVHBBjto53aAbhTjSDQPzmYg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Upgraded, now permission denied. (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Upgraded, now permission denied.
|
Список | pgsql-novice |
>Well, that's what I'd expect to see --- but the prompt indicates that you
>did this in the "postgres" database, which is not where you're having the
>problem. We need to look at the public schema within the mypcc database.
>did this in the "postgres" database, which is not where you're having the
>problem. We need to look at the public schema within the mypcc database.
Oops. Here's the mypcc database.
psql mypcc mypcc
mypcc=> select * from pg_namespace where nspname = 'public';
nspname | nspowner | nspacl
---------+----------+------------------------
public | 10 | {postgres=UC/postgres}
(1 row)
mypcc=> \dt
No relations found.
Hmm. However,
mypcc=> \dt *.* Returns all tables, including
public | uiddate | table | postgres
psql mypcc postgres
mypcc=# select * from uiddate where dateonline >= '2014-06-11';
uid | dateonline | uiddateonline | server
-----+------------+---------------+--------
(0 rows)
So it works for the postgres user. I changed the uiddate table owner to the user 'mypcc' expecting the query to work, and it didn't.
psql mypcc mypcc
mypcc=> select * from uiddate where dateonline >= '2014-01-01';
ERROR: relation "uiddate" does not exist
On Thu, Jun 12, 2014 at 3:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
[ please keep the list cc'd ]Well, that's what I'd expect to see --- but the prompt indicates that you
Jason Whitener <jwhitene@pcc.edu> writes:
> postgres=# select * from pg_namespace where nspname = 'public';
> nspname | nspowner | nspacl
> ---------+----------+-------------------------------------
> public | 10 | {postgres=UC/postgres,=UC/postgres}
> (1 row)
did this in the "postgres" database, which is not where you're having the
problem. We need to look at the public schema within the mypcc database.Hm... that would have the effect of preventing connections to mypcc,
> The only grant/revokes I could find were near the top of the dump file, and
> appears to just be on databases:
> REVOKE ALL ON DATABASE mypcc FROM PUBLIC;
except by the database owner and superusers. However, since you're
not complaining that you can't connect, that doesn't seem to be
your problem.The error message you quoted was quite clearly complaining about
> Does any of the above suggest that I am missing privileges to run queries
> on the database mypcc using the user mypcc?
permissions on a schema, not a database. Those are entirely separate
concepts in Postgres (although not in some other DBMSes, which perhaps
is contributing to your confusion).
regards, tom lane
В списке pgsql-novice по дате отправления: