Thread: Length of sql cols in postgresql

Length of sql cols in postgresql

From
"Th Templ"
Date:
Hello,

I have problem with the cols of table. Postgresql truncates some of them
which are longer than 30 characters.
And when I execute a request in psql, I have the following message:

psql:/applis/jgenea/test.sql:37: NOTICE:  identifier
"commune_nom_equivalent_naissance"
will be truncated to "commune_nom_equivalent_naissanc"

Is it possible to increase the maximum length?
Thianks for your help
Thierry

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


Re: Length of sql cols in postgresql

From
Bruce Momjian
Date:
In 7.3, due out in a few months, the length will be 64.  You can
increase the length by modifying NAMEDATALEN in include/pg_config.h.in,
running configure again, compiling, and initdb.  You can't change it
without a dump/reload of the data.

---------------------------------------------------------------------------

Th Templ wrote:
> Hello,
>
> I have problem with the cols of table. Postgresql truncates some of them
> which are longer than 30 characters.
> And when I execute a request in psql, I have the following message:
>
> psql:/applis/jgenea/test.sql:37: NOTICE:  identifier
> "commune_nom_equivalent_naissance"
> will be truncated to "commune_nom_equivalent_naissanc"
>
> Is it possible to increase the maximum length?
> Thianks for your help
> Thierry
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> ---------------------------(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
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Length of sql cols in postgresql

From
Jochem van Dieten
Date:
Bruce Momjian wrote:
> In 7.3, due out in a few months, the length will be 64.

64? Not 128 as per the SQL spec?
http://archives.postgresql.org/pgsql-hackers/2002-07/msg01275.php

Jochem


Re: Length of sql cols in postgresql

From
Tom Lane
Date:
Jochem van Dieten <jochemd@oli.tudelft.nl> writes:
> Bruce Momjian wrote:
>> In 7.3, due out in a few months, the length will be 64.

> 64? Not 128 as per the SQL spec?
> http://archives.postgresql.org/pgsql-hackers/2002-07/msg01275.php

This was beaten to death in a later thread; see eg.
http://archives.postgresql.org/pgsql-hackers/2002-08/msg00399.php

            regards, tom lane