Skip site navigation (1) Skip section navigation (2)

Re: cannot read pg_class without having selected a database / is this a bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: cannot read pg_class without having selected a database / is this a bug?
Date: 2011-12-04 04:19:54
Message-ID: 11200.1322972394@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tomas Vondra <tv(at)fuzzy(dot)cz> writes:
> That might explain why it fails at first and then works just fine,
> although it's a bit strange. Wouldn't that mean you can't access any
> catalogs from the auth hook?

It should be possible to access shared catalogs from an auth hook.
pg_stat_activity is neither shared nor a catalog.  Like Robert,
I find it astonishing that this works ever, because the info needed
simply isn't available until you've connected to a particular database.
The fact that the view is actually defined the same in every database
doesn't enter into that ...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Nikhil SontakkeDate: 2011-12-04 07:22:56
Subject: Re: Review: Non-inheritable check constraints
Previous:From: NISHIYAMA TomoakiDate: 2011-12-04 03:55:35
Subject: Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group