Re: Geographic data sources, queries and questions

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "John D(dot) Burger" <john(at)mitre(dot)org>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Geographic data sources, queries and questions
Date: 2007-05-29 22:46:45
Message-ID: B5E092C1-0264-4AC5-969E-42D6AD2E89FF@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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. 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.

Michael Glaesemann
grzm seespotcode net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2007-05-29 23:05:18 8.3
Previous Message brsaweda 2007-05-29 22:42:53 SELECT <all fields except "bad_field"> from mytbl;