index and sequence name length limit? 
Author Message
 index and sequence name length limit?

What is the limit on the length of a index or sequence's name?

I have some table with long names and I find it confusing when pgsql
truncates the table name when creating indexes or sequences (for serials).

Why does such a limit exist? I would think that since there are
virtually no limits on the size of data that a table or column can hold
there should be no limit on the length of names assigned to
tables/sequences/indexes/etc ... or if that a limit would be rather long
(say 256 characters?).

Jc

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly



Fri, 21 Jan 2005 11:45:57 GMT
 index and sequence name length limit?

I believe that this question relates to a discussion on -hackers, in which
they are deciding how large to allow the names to be. It looks like the next
release will allow either 64 or 128 characters.

Eventually, I think there are plans to make it a true variable length type for
efficiency and flexibility. I don't think that it will make the next release,
however (7.3).

Regards,
        Jeff Davis


Quote:
> What is the limit on the length of a index or sequence's name?

> I have some table with long names and I find it confusing when pgsql
> truncates the table name when creating indexes or sequences (for serials).

> Why does such a limit exist? I would think that since there are
> virtually no limits on the size of data that a table or column can hold
> there should be no limit on the length of names assigned to
> tables/sequences/indexes/etc ... or if that a limit would be rather long
> (say 256 characters?).

> Jc

> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate

> message can get through to the mailing list cleanly

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Fri, 21 Jan 2005 14:34:52 GMT
 index and sequence name length limit?

Quote:

> What is the limit on the length of a index or sequence's name?

31 by default, but you can increase that by changing the value of
NAMEDATALEN in src/include/pg_config.h, re-compiling, and re-running
initdb.

Cheers,

Neil

--

PGP Key ID: DB3C29FC

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly



Fri, 21 Jan 2005 15:45:07 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Is there limit for host name length?

2. Column name length limit

3. Length Limit on Trigger Names

4. limit on length of table name???

5. Is there a CDML length limit on field names / relationships etc??rus

6. Limited Text field index length??

7. columns names,datatypes,length and indexes !

8. Weblogics/DB2/length index names

9. Table name length (maximum identifier length)

10. Row length limit in SQL Server 2000?

11. Limit to length of string displayed in SELECT statement

12. SQL statement length limit?


 
Powered by phpBB® Forum Software