Re: how to save primary key constraints

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Chris Travers <chris(dot)travers(at)gmail(dot)com>
Cc: rod(at)iol(dot)ie, "J(dot)V(dot)" <jvsrvcs(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: how to save primary key constraints
Date: 2011-10-12 17:51:04
Message-ID: CAHyXU0w+qjgjs8bM76frgEd6PcgFEtcLbkfhD0-t3cJdtds66Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 11, 2011 at 6:37 PM, Chris Travers <chris(dot)travers(at)gmail(dot)com> wrote:
> On Tue, Oct 11, 2011 at 4:33 PM, Raymond O'Donnell <rod(at)iol(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message René Fournier 2011-10-12 18:01:48 PostGIS: Approximating a house number from street address range
Previous Message Anthony Presley 2011-10-12 17:02:05 Re: Drill-downs and OLAP type data