Re: IS it a good practice to use SERIAL as Primary Key?

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: IS it a good practice to use SERIAL as Primary Key?
Дата
Msg-id 456B2E84.3070102@cox.net
обсуждение исходный текст
Ответ на Re: IS it a good practice to use SERIAL as Primary Key?  (Scott Marlowe <smarlowe@g2switchworks.com>)
Ответы Re: IS it a good practice to use SERIAL as Primary Key?  (John McCawley <nospam@hardgeus.com>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/27/06 11:47, Scott Marlowe wrote:
> On Thu, 2006-11-23 at 10:23, Ron Johnson wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 11/22/06 20:23, carter ck wrote:
>>> Hi all,
>>>
>>> I am wonderring if it is a good practice to use SERIAL index as primary
>>> key, as it is only available up to 9999999?
>>>
>>> Currently i am dealing with storing LDAP users into Postgres and i am
>>> looking for a better way to make use of the DN as primary key instead of
>>> SERIAL index.
>>>
>>> Any advice or suggestion is appreciated.
>> I'm one of those who thinks that a (possibly multisegment) natural
>> key *does* exist, and that if you think it doesn't, your design is
>> wrong.
>
> Spend some time in the travel industry...  The tax category ZO means
> Passenger Service Chareg in Denmark.  Or Greenland, or Faroe Islands.
> And can be entered more than once.  And the travel agent has to look at
> the context of the travel itinerary to know which one(s) it is.
>
> Sadly, the real world has many data problems created by idiots in suits
> 30 years ago that aren't going to go away any time soon.

Yes, that's the point.  They are legacy designs, and that portion of
the design is wrong.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFay6ES9HxQb37XmcRAly9AKC5qEpO9Z9Oscf5Bp3nbuSgIswPJwCg0dh3
FoDu81i4pndNwIQ88Bl2SsU=
=WCzo
-----END PGP SIGNATURE-----

В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: IS it a good practice to use SERIAL as Primary Key?
Следующее
От: Tony Caduto
Дата:
Сообщение: Re: PostgreSQL doesn't accept connections when Windows