Re: Using the internal data dictionary

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Using the internal data dictionary
Date: 2011-11-18 03:35:35
Message-ID: 4EC5D287.3020806@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/17/11 7:17 PM, Bill Thoen wrote:
> I need to assemble a complete data dictionary for project documentation and other purposes and I was wondering about the pros and cons of using the pg_catalog metadata. But I hesitate to poke around in here because I don't know why it's kept so out of sight and not much documented. But it seems like an ideal source of information to tap with a program to generate accurate, current reports of what's in the database.
>
> Is this a bad idea (everything I'm thinking of doing would be read only except for the description fields) but I'd just like to make sure that there's not some innocent looking table in there that acts as a doomsday device if you so much as read its first record, etc. I'm just not sure why this isn't more widely used or talked about.

pg_catalog is whats used to extract the data displayed by all the
various \ commands in psql, by pgadmin3, pg_dump, etc.... the sql
standard information_schema is in fact implemented as views into pg_catalog

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2011-11-18 06:05:44 Re: Result of ORDER-BY
Previous Message David Johnston 2011-11-18 03:34:49 Re: Using the internal data dictionary