"Tim Barnard" <tbarnard(at)povn(dot)com> writes:
> When creating a table with a primary key that can contain any varying
> sequence of alphanumeric characters, is it best to use the 'text' type or
> the 'varchar' type?
If you want a specific upper limit on the string length, use varchar.
If that's not needed, use text. The only difference in performance
AFAIK is the extra function call per insert/update for the routine that
enforces the varchar limit.
regards, tom lane