Document Upper Limit for NAMEDATELEN in pgsql 9.5+ - Mailing list pgsql-docs

From Kevin Day
Subject Document Upper Limit for NAMEDATELEN in pgsql 9.5+
Date
Msg-id CABOug-ugKe=SZRma+SW4=L6H_kkqZ6F4dB8H=VCOEzuN4-Mm4g@mail.gmail.com
Whole thread Raw
Responses Re: Document Upper Limit for NAMEDATELEN in pgsql 9.5+
List 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

pgsql-docs by date:

Previous
From: Philippe BEAUDOIN
Date:
Subject: pg_extension_config_dump() function and sequences
Next
From: Tom Lane
Date:
Subject: Re: Document Upper Limit for NAMEDATELEN in pgsql 9.5+