On Tue, 2011-12-13 at 10:31 -0500, Rick Dicaire wrote:
> On Tue, Dec 13, 2011 at 2:22 AM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
> > Did you add the role OID after "WHERE dep.refobjid="? if you didn't,
> > yeah, you'll get a syntax error.
>
> Thanks...tried a few role OIDs for known object ownerships, this code
> returned 0 rows:
>
> select usename,usesysid from pg_user where usesysid=17875;
> usename | usesysid
> ----------+----------
> rdicaire | 17875
> (1 row)
>
> ###############################################
>
> select relname,relowner from pg_class where relowner=17875;
> relname | relowner
> ----------------------+----------
> pg_toast_19341 | 17875
> pg_toast_19341_index | 17875
> rick_test | 17875
> (3 rows)
>
> ################################################
It should have. My understanding is that, if you're owner of an object,
there is a dependency between the object and the user. Maybe my
understanding is wrong. Or maybe the SQL I gave you is wrong. You should
better look at the source file to make sure I didn't give you a wrong
SQL statement.
--
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com