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

  • Home
  • SEARCH
  • 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 6869037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:30:31+00:00 2026-05-27T03:30:31+00:00

Hope this question wasn’t asked before. Does anyone know the character limit for domain

  • 0

Hope this question wasn’t asked before. Does anyone know the character limit for domain names?
For example if I write this:

CREATE DOMAIN d_complement_activite_etablissement AS character varying

it will create a domain with the name:

d_complement_activite_etabliss

(Yeah, I know how to count, but I want some more info on the subject).

Is there a command that can change this maximum length? Is this length the same for other names (columns, tables etc)?

  • 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-27T03:30:31+00:00Added an answer on May 27, 2026 at 3:30 am

    You ask:

    Is there a command that can change this maximum length? Is this length
    the same for other names (columns, tables etc)?

    The manual answers here:

    The system uses no more than NAMEDATALEN-1 bytes of an identifier;
    longer names can be written in commands, but they will be truncated.
    By default, NAMEDATALEN is 64 so the maximum identifier length is 63 bytes. If this limit is problematic, it can be raised by changing the
    NAMEDATALEN constant in src/include/pg_config_manual.h.

    Bold emphasis mine.

    The only way to change it is to hack the source code and recompile PostgreSQL.
    Domain names are identifiers like any other. When I execute:

    CREATE DOMAIN d_complement_activite_etablissement_or_even_loger_than_that AS text
    

    I get what I ordered (tested on PostgreSQL 8.4 – 11):

    d_complement_activite_etablissement_or_even_loger_than_that
    

    There must be some other piece of software between you and your database cropping the name.

    Note that characters in UTF encoding occupy 1 to 4 bytes. (But ASCII characters (like used in the example) are encoded with a single byte.)

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

Sidebar

Related Questions

I hope this question has not been asked yet, but I want to know
Hope this question hasn't been asked before. I've got the following working <!-- 640x920
I hope this question does not come off as broad as it may seem
I hope this question has an obvious answer to anyone who knows his way
A question like this was asked before and the person got nothing but criticisms,
I hope this question has not been asked, I tried to search for similar
I hope this question is not considered too basic for this forum, but we'll
I hope this question is not a RTFM one. I am trying to write
I hope this question is not 'controversial' - I'm just basically asking - has
I hope this question is not a duplicate but I didn't find anything equivalent

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.