How do I change the NAMEDATALEN configuration after installing PostgreSQL 9.0?

后端 未结 1 1009
广开言路
广开言路 2021-01-18 13:42

I\'m supporting some legacy PostgreSQL 8.3/4 databases, and migrating them onto some newer Windows Server 2008 hardware.

I\'ve been informed that the NAMEDATALEN fig

相关标签:
1条回答
  • 2021-01-18 14:01

    It's not possible to alter this option - it needs to be changed in source file src/include/pg_config_manual.h. Then Postgres needs to be recompiled, data directory initialized with initdb and data restored. Every security and bugfix minor release will then have to be patched and recompiled. This is bad thing to do.

    This is much easier and sensible to patch an application source to use shorter table/function/etc names. The maximum is 63 characters, which is enough for insanely_stupid_and_totally_impractical_table_or_function_name0

    Maybe your schema really does not need longer names, and this requirement it is just an artifact from long gone version of your client application. Check this - try to import a schema and functions to new database.

    And this question should probably be migrated to serverfault.com.

    0 讨论(0)
提交回复
热议问题