Primary keys in a single column table and text vs varchar - Mailing list pgsql-novice

From matty jones
Subject Primary keys in a single column table and text vs varchar
Date
Msg-id AANLkTinBzLwNo8raW-iqvursq_rey3nG=wkXxy0J6+cn@mail.gmail.com
Whole thread Raw
Responses Re: Primary keys in a single column table and text vs varchar
List pgsql-novice
I am designing a table that will hold a list of unique names and be referenced by several other tables.  There will only be one column in the table (name), should I still create a separate primary key for that column or can I use the name column as my key.  I have also been reading a lot about the differences between varchar and text and was wondering if there is a downside to using text.  The column I want to use text on (notes) will hold a string that could be any length, I can use varchar(255) but I am worried about the text being truncated or of the queries giving errors when I try to output the text.  I understand there is a mathematical limit to how much can be stored in a single entry but I wasn't sure of any downsides to just defaulting to text when possible.

Thanks,

Matt

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] systable_getnext_ordered
Next
From: Bruce Momjian
Date:
Subject: Re: Postgresql security checks