tags:

views:

27

answers:

1

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 figure needs to be higher than the default.

As far as I understand, the NAMEDATALEN configuration does not exist in a config file, but rather needs to be set on compiling the application.

Having already installed PostgreSQL 9.0 on the new box, I'm wondering if it's possible to alter this configuration after the fact?

+2  A: 

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.

Tometzky