Skip to content

PG->Fabric (T-SQL): pg_typeof() emitted verbatim #304

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)
SELECT pg_typeof(a) FROM t SELECT PG_TYPEOF(a) FROM t

Defect: PG catalog function with no T-SQL equivalent → Msg 195.

Fix: fail-fast under strict() (no faithful equivalent; SQL_VARIANT_PROPERTY(a,'BaseType')
only works for sql_variant).

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