Re: Varchar or integer primary key? - Mailing list pgsql-novice

From Rafael Charnovscki
Subject Re: Varchar or integer primary key?
Date
Msg-id 410659B9.30702@unesc.rct-sc.br
Whole thread Raw
In response to Varchar or integer primary key?  (Rafael Charnovscki <charnovs@unesc.rct-sc.br>)
List pgsql-novice
Thanks for the answers. They really helped me.
As I thougth, that is sort of issue related
to modeling, design, RDBMS and experience!

Best regards,
Rafael Charnovscki

> Rafael Charnovscki <charnovs@unesc.rct-sc.br> writes:
>
>>I have a 6-digit integer number for a patient identifier which
>>I intend to use as a primary key (PK) for a table. It also will
>>be a foreign key in other tables. Do I have to use an integer data
>>type as a domain for this PK or could I use a varchar(6)?



pgsql-novice by date:

Previous
From: Chris
Date:
Subject: Re: hexdecimal constant in postgresql
Next
From: Betsy Barker
Date:
Subject: Problem assigning return value from function to a variable