Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 822851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:51:27+00:00 2026-05-15T02:51:27+00:00

I am using character varying data type in PostgreSQL. I was not able to

  • 0

I am using character varying data type in PostgreSQL.
I was not able to find this information in PostgreSQL manual.
What is max limit of characters in character varying data type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:51:27+00:00Added an answer on May 15, 2026 at 2:51 am

    Referring to the documentation, there is no explicit limit given for the varchar(n) type definition. But:

    …
    In any case, the longest possible
    character string that can be stored is
    about 1 GB. (The maximum value that
    will be allowed for n in the data type
    declaration is less than that. It
    wouldn’t be very useful to change this
    because with multibyte character
    encodings the number of characters and
    bytes can be quite different anyway.
    If you desire to store long strings
    with no specific upper limit, use text
    or character varying without a length
    specifier, rather than making up an
    arbitrary length limit.)

    Also note this:

    Tip: There is no performance
    difference among these three types,
    apart from increased storage space
    when using the blank-padded type, and
    a few extra CPU cycles to check the
    length when storing into a
    length-constrained column. While
    character(n) has performance
    advantages in some other database
    systems, there is no such advantage in
    PostgreSQL; in fact character(n) is
    usually the slowest of the three
    because of its additional storage
    costs. In most situations text or
    character varying should be used
    instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: Crap! it's not an integer it's character varying(10) Executing the query like this
Replacing the Special Character using Perl while i am doing this . I got
You'll have to forgive my ignorance, but I'm not used to using wide character
When using visual studio - when I type an open quotation character in the
I am using postgreSQL. I have a column that: NOT NULL However when I
I'm adding a new, NOT NULL column to my Postgresql database using the following
I'm trying to map java.util.Date to postgresql timestamp without time zone type. I'm using
Special characters can be distinguished using backslash character \ . However, I want to
In Javascript I can type '\u00A3' to get a character using its char code.
I tried to mask the characters in a creditcard number string using character 'X'.I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.