Re: Geographic data sources, queries and questions

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Geographic data sources, queries and questions
Date: 2007-05-30 07:14:53
Message-ID: 465D246D.8080109@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/29/07 17:46, Michael Glaesemann wrote:
>
> On May 29, 2007, at 15:28 , John D. Burger wrote:
>
>> Even ISO country codes are not guaranteed to be stable
>
> I'm not sure where the idea that primary keys must be stable comes from.
> There's nothing necessarily wrong with updating a primary key. All a
> primary key does is uniquely identify a row in a table. If that id
> changes over time, that's fine, as long as the primary key columns
> continue to uniquely identify each row in the table.

And any archived data (for example, transaction detail that you must
keep for 7 years but don't still want in your database, since it
doubles your backup/restore times) will still have the old codes.

"Static" data needs to be static.

> SQL even provides
> ON UPDATE CASCADE to make this convenient. There may be performance
> arguments against updating a primary key (as the changes need to
> propagate), but that depends on the needs of a particular (benchmarked
> and tested) application environment.

--
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2007-05-30 07:26:46 Re: opclass for real[]
Previous Message Ron Johnson 2007-05-30 07:07:38 Re: hundreds of schema vs hundreds of databases