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

Reply via email to