Re: pg_stats view added to CVS tip - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_stats view added to CVS tip
Date
Msg-id Pine.LNX.4.30.0106161737370.755-100000@peter.localdomain
Whole thread Raw
In response to pg_stats view added to CVS tip  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> The view also tries to be slightly more user-friendly than a raw look at
> pg_statistic.  It joins to pg_class and pg_attribute to get the names of
> tables and columns, and it presents the various kinds of statistics
> intelligently labeled.  (Thus, the view has wired into it exactly the
> sort of assumptions we agreed not to make in pg_statistic itself.
> Peter E. may be unhappy with me here.  But it seems to me that we can
> change/extend the view definition when we add new kinds of statistics
> entries.)

For informational views this is okay AFAICS; the SQL information schema is
full of this kind of thing.  When you want to present alternative
information you add a new column and return null in the old ones.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: UNIQUE INDEX unaware of transactions (a spin of question)
Next
From: Tom Lane
Date:
Subject: Re: postgres dies while doing vacuum analyze