Re: how to save primary key constraints - Mailing list pgsql-general

From Merlin Moncure
Subject Re: how to save primary key constraints
Date
Msg-id CAHyXU0w+qjgjs8bM76frgEd6PcgFEtcLbkfhD0-t3cJdtds66Q@mail.gmail.com
Whole thread Raw
In response to Re: how to save primary key constraints  (Chris Travers <chris.travers@gmail.com>)
List pgsql-general
On Tue, Oct 11, 2011 at 6:37 PM, Chris Travers <chris.travers@gmail.com> wrote:
> On Tue, Oct 11, 2011 at 4:33 PM, Raymond O'Donnell <rod@iol.ie> wrote:
>> On 12/10/2011 00:24, J.V. wrote:
>>> pg_catalog table does not exist.
>>>
>>
>> It's not a table, it's PostgreSQL's version of the information_schema
>> catalog:
>>
>>  http://www.postgresql.org/docs/8.4/static/catalogs.html
>>
> Not quite.  PostgreSQL has an information_schema too.
>
> The pg_catalog is the schema of system catalogs for PostgreSQL.  The
> catalogs are not guaranteed to be stable interfaces the way the
> information_schema is.


This -- always look for your answer first in information_schema.  As a
bonus, it's also portable to many other databases and is much easier
to follow.

Only go to the catalogs if your performance requirements are extreme
and/or you are looking for postgres specific info not found in the
standard schema.

merlin

pgsql-general by date:

Previous
From: Anthony Presley
Date:
Subject: Re: Drill-downs and OLAP type data
Next
From: "J.V."
Date:
Subject: Re: how to key/value iterate in stored function