What is the difference between CHARACTER VARYING and VARCHAR in PostgreSQL?

What is the difference between CHARACTER VARYING and VARCHAR in PostgreSQL?

Asked on January 9, 2019 in PostgreSQL.
Add Comment


  • 3 Answer(s)

               changeable is an alias for varchar, so no difference, see documentation

              The documentation varchar(n) and char(n) are aliases for character varying(n) and character(n), respectively. character without length specifier is equivalent to character(1). If character varying is used without length specifier, the type accepts strings of any size. The latter is a ostgreSQL extension.

    Answered on January 9, 2019.
    Add Comment

    This is very good reference you refer it

    PostgreSQL documentation on Character Types

    They are two different names for the same type.

    Answered on January 9, 2019.
    Add Comment

    This only  difference is that CHARACTER VARYING is more human friendly than VARCHAR

    Answered on January 9, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.