[Fwd: Re: Question] - Mailing list pgsql-advocacy

From Rod Taylor
Subject [Fwd: Re: Question]
Date
Msg-id 1077381556.31467.13.camel@jester
Whole thread Raw
List pgsql-advocacy
> > rbt=# select nspname, sum(relpages) from pg_class join pg_namespace n on
> > (relnamespace = n.oid) group by nspname, relnamespace having 2 > (SELECT
> > count(*) from pg_constraint where relnamespace = connamespace);
> >
> > With some effort you might be able to get the above down to a single
> > line (shorter column names, etc.).
> >
> > It takes the sum of pages used by relations in namespaces with a minimum
> > of 2 constraints.
>
> I think any query fiddling with metadata is a bad idea for a sig.

Of course. I was simply demonstrating a query class that is complicated
which many databases probably don't support (PostgreSQL didn't until
recently) and spec compliant.
--
Rod Taylor <pg [at] rbt [dot] ca>

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


pgsql-advocacy by date:

Previous
From: David Costa
Date:
Subject: Re: Question
Next
From: Joe Conway
Date:
Subject: Re: Question