Thread: Where to document system views?

Where to document system views?

From
Tom Lane
Date:
I have noticed that there is a nearly total lack of documentation of the
various predefined system views, which as of 7.2 include:

    pg_indexes
    pg_rules
    pg_stat_activity
    pg_stat_all_indexes
    pg_stat_all_tables
    pg_stat_database
    pg_stat_sys_indexes
    pg_stat_sys_tables
    pg_stat_user_indexes
    pg_stat_user_tables
    pg_statio_all_indexes
    pg_statio_all_sequences
    pg_statio_all_tables
    pg_statio_sys_indexes
    pg_statio_sys_sequences
    pg_statio_sys_tables
    pg_statio_user_indexes
    pg_statio_user_sequences
    pg_statio_user_tables
    pg_stats
    pg_tables
    pg_user
    pg_views

The lack of docs for the pg_stat* stuff can be blamed on Jan and me,
but the other ones are of longer standing.  My current thought is to
add a section somewhere that describes these views, but where?  I don't
think it's quite right to document them under the System Catalogs
chapter of the Developer's Guide, since they're all intended for use
by ordinary users and dbadmins; the system itself doesn't use them.
Thoughts?

            regards, tom lane

Re: Where to document system views?

From
Peter Eisentraut
Date:
Tom Lane writes:

> > The others could become part of a chapter in the User's Guide I've been
> > meaning to write on "schema creation", which would describe what tables,
> > views, contraints, and such are.  A subsection on how to reverse engineer
> > the created schema would fit naturally.
>
> Seems okay.  Are you thinking of getting that done for 7.2, or is this a
> long-term idea?

It's a long-term idea that should finally get done for 7.2. ;-)

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


Re: Where to document system views?

From
Peter Eisentraut
Date:
Tom Lane writes:

> My current thought is to add a section somewhere that describes these
> views, but where?  I don't think it's quite right to document them
> under the System Catalogs chapter of the Developer's Guide, since
> they're all intended for use by ordinary users and dbadmins; the
> system itself doesn't use them. Thoughts?

The pg_stat-related views ought to become part of a new section that
describes that whole deal in the first place.  If there is a lot to say it
could become a new chapter in the Admin Guide (perhaps "Monitoring...").
If there is only little to say it could be thrown into the big old "Server
Run-time Environment".

The others could become part of a chapter in the User's Guide I've been
meaning to write on "schema creation", which would describe what tables,
views, contraints, and such are.  A subsection on how to reverse engineer
the created schema would fit naturally.

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


Re: Where to document system views?

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> The pg_stat-related views ought to become part of a new section that
> describes that whole deal in the first place.  If there is a lot to say it
> could become a new chapter in the Admin Guide (perhaps "Monitoring...").

That seems like a good plan for Jan's runtime statistics stuff.  But
pg_stats doesn't quite fit with the others.  Maybe I'll put it into the
"performance tips" area.

> The others could become part of a chapter in the User's Guide I've been
> meaning to write on "schema creation", which would describe what tables,
> views, contraints, and such are.  A subsection on how to reverse engineer
> the created schema would fit naturally.

Seems okay.  Are you thinking of getting that done for 7.2, or is this a
long-term idea?

            regards, tom lane