Document Upper Limit for NAMEDATELEN in pgsql 9.5+

From: Kevin Day <thekevinday(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Document Upper Limit for NAMEDATELEN in pgsql 9.5+
Date: 2016-01-08 19:29:32
Message-ID: CABOug-ugKe=SZRma+SW4=L6H_kkqZ6F4dB8H=VCOEzuN4-Mm4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Postgresql 9.5+ may now fail to compile if NAMEDATELEN has been set
absurdly large (In my case, 384).

The file src/backend/utils/adt/levenshtein.c does a static assert on
"NAMEDATALEN <= MAX_LEVENSHTEIN_STRLEN" with MAX_LEVENSHTEIN_STRLEN
currently set to 255.

When using a gcc version that does not support static asserts, the error
message looks like:
- "levenshtein.c:104: error: negative width in bit-field
'static_assert_failure'"

It would be great to be mention this new upper limit on NAMEDATALEN in the
documentation.

Here are some places I've looked at:
- src/include/pg_config_manual.h
- http://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html
- http://www.postgresql.org/docs/9.5/static/runtime-config-preset.html
- https://wiki.postgresql.org/wiki/Todo

While on the subject of NAMEDATALEN, there is a second undocumented place
where NAMEDATALEN is defined:
- src/interfaces/ecpg/include/sqlda-native.h

--
Kevin Day

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2016-01-08 19:49:22 Re: Document Upper Limit for NAMEDATELEN in pgsql 9.5+
Previous Message Robert Haas 2016-01-06 17:38:08 Re: Description tweak for vacuumdb