Skip site navigation (1) Skip section navigation (2)

Re: Column Name Length

From: "Ernesto Gutierrez" <world(at)eldergriffon(dot)org>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Column Name Length
Date: 2002-06-07 23:03:52
Message-ID: 00ec01c20e77$97b0d200$2606000a@egutierrez (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I have to laugh because I ran into precisely this problem for the first time
earlier today.

It appears that the maximum limit to any identifier name (be it table,
column, sequence, etc) is equal to the NAMEDATALEN constant in
/src/include/postgres_ext.h. So, presumably you can recompile the binaries
for a larger value. 64 (rather than 32) has been discussed in various places
as a reasonable compromise between convenience and performance. However, I
haven't tried this as yet. Perhaps someone else has better advice.

Ernie Gutierrez
Walnut Creek, California

----- Original Message -----
From: "James Kelty"
> Hello,
> It seems that colummn name lengths are limited to 32 characters, is this
> true?  Actually 31 when I think about it. We have a column name that is 32
> characters long, but the last character is getting chopped of. Is there a
> way around this?
> -James
> James Kelty
> Sr. Unix Systems Administrator
> The Ashland Agency
> jamesk(at)ashlandagency(dot)com
> 541.488.0801
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

In response to

pgsql-novice by date

Next:From: Gyan KapurDate: 2002-06-08 05:14:40
Subject: Dear sirs,
Previous:From: James KeltyDate: 2002-06-07 22:48:09
Subject: Column Name Length

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group