index and sequence name length limit?

Поиск
Список
Период
Сортировка
Искать

index and sequence name length limit?

От:
Jean-Christian Imbeault <jc@mega-bucks.co.jp>
Дата:
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

Re: index and sequence name length limit?

От:
Jeff Davis <list-pgsql-general@empires.org>
Дата:
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



On Sunday 04 August 2002 08:41 pm, Jean-Christian Imbeault wrote:
> 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
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Re: index and sequence name length limit?

От:
Neil Conway <nconway@klamath.dyndns.org>
Дата:
Jean-Christian Imbeault  writes:
> 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

-- 
Neil Conway 
PGP Key ID: DB3C29FC
FAQ