Please Postgres Database Limitations Considerations

Created on 8 April 2010, about 15 years ago
Updated 21 September 2024, 7 months ago

There needs to be some discussion of the various issues with the different database engines.

I don't use Mysql, so I don't see those issues, but we use Postgres, and we keep getting bit by a pernicious limitation that we should have been warned about in the installation documentation: Identifier length.

Postgres has a maximum length for an identifier in an sql query. Complex queries built by modules, (i.e. the Views module) will routinely lengthen the field names of cck fields to ensure uniqueness. This will burn you if the newly lengthened fields are longer than Postgres will allow. The administrator can mitigate this by using minimum-length field names. The limit in Postgres is adjustable, but it isn't just a runtime or reboot fix, you have to recompile postgres.

As an example, a field I'm using is called 'field_home_page_url' in a view I'm building, it has become:
'node_node_data_field_cert_program_node_data_field_home_page_url_field_home_page_url_value'
This gets truncated to:
'node_node_data_field_cert_program_node_data_field_home_page_url'

Since you can't rename fields, (complex manual SQL aside), this is kind of a trap you're setting for innocent new Drupal admins.

So Postgres users should be warned:
1. In installation documentation
2. In CCK documentation
3. In Views documentation

📌 Task
Status

Active

Component

Correction/Clarification

Created by

🇺🇸United States sbayne

Live updates comments and jobs are added and updated live.
  • server stuff

    Used in Documentation issues for documentation problems related to servers, such as installing/configuring/debugging Apache, MySql, PostgreSQL, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024