Re: bug in information_schema? - Mailing list pgsql-sql

From Tom Lane
Subject Re: bug in information_schema?
Date
Msg-id 26942.1122736512@sss.pgh.pa.us
Whole thread Raw
In response to bug in information_schema?  (Kyle Bateman <kyle@actarg.com>)
Responses Re: bug in information_schema?
List pgsql-sql
Kyle Bateman <kyle@actarg.com> writes:
> I noticed that it seemed a bit slow to query 
> information_schema.view_column_usage.   As I look at the code in 
> information_schema.sql, I'm not sure why pg_user is referenced twice 
> (once without an alias).  It looks like we can take out the first 
> pg_user and remove the DISTINCT keyword and this improves the efficiency 
> significantly.

The unconstrained join against pg_user is clearly unnecessary,
and in fact I took it out a few days ago.  I'm not sure whether the
SELECT DISTINCT is still needed --- it might be, if there can be
multiple pg_depend entries linking the same entities.
Peter, any thoughts?
        regards, tom lane


pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: How to loop though an array plpgsql?
Next
From: "Dinesh Pandey"
Date:
Subject: How to connect ORACLE database from Postgres function using plpgsql/pltclu?