Skip to content

Timestamp columns with time zone map to UserDefinedType rather than TIMESTAMP #226

@hammerhead

Description

@hammerhead

Description
Given this table:

CREATE TABLE IF NOT EXISTS "doc"."t1" (
   "ts" TIMESTAMP,
   "tsw" TIMESTAMP WITH TIME ZONE,
   "tswo" TIMESTAMP WITHOUT TIME ZONE
)

On inspection of columns:

from sqlalchemy import create_engine
from sqlalchemy import inspect

engine = create_engine("crate://localhost")
inspector = inspect(engine)

for col in inspector.get_columns("t1"):
    print(f"{col["name"]} {col["type"]}")

Actual behaviour
The following output is returned:

ts UserDefinedType()
tsw TIMESTAMP
tswo UserDefinedType()

Expected behaviour
All three columns should map to TIMESTAMP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions