Re: Column Statistics - How to dertermine for whole database

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Ow Mun Heng" <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
Cc: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Column Statistics - How to dertermine for whole database
Date: 2008-03-13 04:40:28
Message-ID: dcc563d10803122140i6b65572cvd9048f10b85a39ad@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 12, 2008 at 8:45 PM, Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com> wrote:
> On Wed, 2008-03-12 at 21:33 -0500, Adam Rich wrote:
> > select c.relname, a.attname, attstattarget
> > from pg_catalog.pg_attribute a, pg_catalog.pg_class c,
> > pg_catalog.pg_namespace n
> > where a.attrelid = c.oid and c.relnamespace=n.oid
> > and n.nspname = 'public' and a.attnum > 0
>
> Funny, that does not work.
>
> note : I did change the nspace value to reflect the DB I'm
> using/querying
>
> I've even changed the stat level to 200 (default is 100 or -1)

The nspname setting setting is for schema, not db name.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2008-03-13 04:54:19 Re: Can't rename an existnig DB because it doesn't exist???
Previous Message Scott Marlowe 2008-03-13 04:33:38 Re: FROM + JOIN when more than one table in FROM