Обсуждение: column name length

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

column name length

От
Felipe Nascimento
Дата:

Is there a max length (number of characters) to column names??

I received the following:
identifier "petb_convidado_partida_participante" will be truncated to "petb_convidado_partida_particip"

Tks
Felipe

Re: column name length

От
Joe Conway
Дата:
Felipe Nascimento wrote:
> Is there a max length (number of characters) to column names??
>
> I received the following:
> identifier "petb_convidado_partida_participante" will be truncated to
> "petb_convidado_partida_particip"
>
> Tks
> Felipe
>

Yes -- it is 31 characters max by default. You can change it, but only
by modifying the source code and recompiling.

HTH,

Joe


Re: column name length

От
Joel Burton
Дата:
On Fri, 8 Mar 2002, Felipe Nascimento wrote:

> Is there a max length (number of characters) to column names??
>
> I received the following:
> identifier "petb_convidado_partida_participante" will be truncated to
> "petb_convidado_partida_particip"

32. You can recompile PG if you need more.

--

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant


Re: column name length

От
Ian Barwick
Дата:
On Saturday 09 March 2002 01:21, Felipe Nascimento wrote:
> Is there a max length (number of characters) to column names??
>
> I received the following:
> identifier "petb_convidado_partida_participante" will be truncated to
> "petb_convidado_partida_particip"
>
> Tks
> Felipe

system identifiers are limited in the default configuration
to 31 characters, as has been pointed out, you will need to
rebuild PostgreSQL to change this value.

HOWTO:

in the file

  src/include/postgres_ext.h

change NAMEDATALEN to your desired value + 1
(current setting is 32, which gives a maximum length of 31
characters).

Changing NAMEDATALEN to a greater value is on the todo-list, see:

http://archives.postgresql.org/pgsql-general/2002-01/msg00941.php


Ian Barwick