Repository navigation
PostgreSQL, ClickHouse: Keep custom data type modifiers re-parseable with a typed list - #2676
Open
LucaCappelletti94 wants to merge 1 commit into
Open
LucaCappelletti94 wants to merge 1 commit into
LucaCappelletti94 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2676 +/- ##
=======================================
Coverage 81.28% 81.28%
=======================================
Files 42 42
Lines 33920 33929 +9
Branches 33920 33929 +9
=======================================
+ Hits 27571 27579 +8
Misses 2785 2785
- Partials 3564 3565 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
custom-type-modifier-quoting
branch
from
October 18, 2026 14:17
960fc8a to
0730482
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PostgreSQL lets user-defined types take simple constants or identifiers as modifiers (https://www.postgresql.org/docs/current/sql-createtype.html), and ClickHouse writes
Object('json').DataType::Customstored each modifier as a bareString, so the quotes were lost on display:Object('json')was printed asObject(json),foo('a b')asfoo(a b)(parsed back as two modifiers), andfoo('it''s')asfoo(it's), which no longer parses.DataType::Customnow holds aVec<TypeModifier>, which keeps identifiers (with their quote style), numbers (with theLsuffix) and single-quoted strings apart, and strings are displayed with their quotes escaped. This is a public API change for code that builds or matchesDataType::Customor callsparse_optional_type_modifiers. Tests round-trip string, identifier and number modifiers in every dialect, and the ClickHouseObjecttest now checks the typed modifiers.This conflicts with #2557, which also builds
DataType::Custommodifiers, so whichever lands second needs a small update.