feat(outputs.postgresql): Allow limiting of column name length #16041
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
PostgreSQL imposes a identifier length limit, leading to errors if column names (derived from field or tag names) are too long. Currently the default limit is 63 characters.
To allow cutting-off too long column names, this PR introduces a new option where you can set the cut-off limit. However, this should be used with care as it might cause column name collision if the differentiating part of column names is beyond the given limit.
Furthermore, the PR also limits logging the "too long" error to once per column name.
Checklist
Related issues
resolves #15964