I like to have constraint, so I usually use character varying.
Anyway, there is no performance difference:
http://www.postgresql.org/docs/9.2/static/datatype-character.html
So use character varying just if you can, or if you must limit the input.
2013/11/12 Craig R. Skinner <skinner@britvault.co.uk>:
> When writing (9.2) PostgreSQL functions, is it preferable to have text
> or character varying args?
>
> The tables the functions are updating/inserting into have character
> varying columns.
>
> I've used both in various places & want to unify.
>
> Using character varying with an over length arg causes the function to
> bomb out on calling, which seems the logical thing to do as the table
> can't accept the data anyway.
>
> Thoughts?
> --
> Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql