Re: Q: pg_catalog views, OIDs and search_path

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Barwick <barwick(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Q: pg_catalog views, OIDs and search_path
Date: 2003-02-17 23:44:26
Message-ID: 16235.1045525466@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ian Barwick <barwick(at)gmx(dot)net> writes:
> Q: is there any likelihood of the pg_catalog views (pg_views, pg_tables,
> pg_indexes, pg_rules, possibly others I have missed) returning the
> relevant OID or (probably cleaner) the result of pg_table_is_visible()
> as a boolean?

That strikes me as awfully ugly --- the apparent contents of the view
would change depending on your search_path setting. Which seems weird.

> Otherwise the only workaround will be to ignore the catalog views and
> work with pg_class directly, which I will probably do, but it
> feels like a step backwards.

I don't see a problem with it. The only thing those views really do for
you is keep you from having to know the character codes for relkind,
which is not a lot of implementation-dependence compared to all the
other stuff that \d knows ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Curtis Faith 2003-02-17 23:52:50 Re: Brain dump: btree collapsing
Previous Message Tom Lane 2003-02-17 23:39:29 Re: deadlock in REINDEX