Skip to content

PG->Fabric (T-SQL): gen_random_uuid() emitted verbatim #303

Description

@VaibhaveS

Found while transpiling PostgreSQL -> Microsoft Fabric (T-SQL) with polyglot-sql 0.5.15 (main 43a4458, latest release tag). Scope: SELECT queries only. Every "Actual" value was captured directly from transpile(sql, DialectType::PostgreSQL, DialectType::Fabric). Unless the table notes otherwise, each case also reproduces under Dialect::get(PostgreSQL).transpile_with(sql, Fabric, TranspileOptions::strict()). Cross-checked against the existing PostgreSQL->Fabric issue series (#257-#286) to avoid duplicates.

Failing SELECT query

Input (PostgreSQL) Actual (invalid) Expected
SELECT gen_random_uuid() SELECT GEN_RANDOM_UUID() SELECT NEWID()

Defect: not a Fabric/T-SQL built-in → Msg 195.

Fix: map gen_random_uuid() (and uuid_generate_v4()) → NEWID().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions