Skip to main content
Version: Next

normalizePartitionNameForComparison

Callable

  • normalizePartitionNameForComparison(name): string

  • Normalize a partition name for collision detection. Mirrors PostgreSQL identifier resolution: unquoted segments fold to lower case, quoted segments preserve case and un-escape embedded "". Returns a canonical schema.name form so both schema-qualified and bare names compare consistently (.name vs schema.name stay distinguishable).

    Part_1, part_1, and "part_1" all normalize to the same value, catching collisions that would otherwise only surface as runtime PG "relation already exists" errors.


    Parameters

    • name: string

    Returns string