Skip site navigation (1) Skip section navigation (2)

Re: Varchar or integer primary key?

From: Rafael Charnovscki <charnovs(at)unesc(dot)rct-sc(dot)br>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Varchar or integer primary key?
Date: 2004-07-27 13:33:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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(at)unesc(dot)rct-sc(dot)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)?

In response to

pgsql-novice by date

Next:From: Betsy BarkerDate: 2004-07-28 21:02:24
Subject: Problem assigning return value from function to a variable
Previous:From: ChrisDate: 2004-07-27 07:29:32
Subject: Re: hexdecimal constant in postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group