pgtyped icon indicating copy to clipboard operation
pgtyped copied to clipboard

Type inference issues in the Postgres engine

Open adelsz opened this issue 3 years ago • 1 comments

This is a meta issue to track all type inference issues occurring inside the PostgreSQL engine. At this stage we can't solve them inside pgTyped without building a more powerful SQL parser. Ideally they should be fixed inside PostgreSQL.

Issues:

  • #197
  • #191
  • #354
  • #327
  • #431
  • #313
  • #450
  • #201

adelsz avatar Dec 04 '21 13:12 adelsz

Another possible meta issue, literal column values end up being type | null.

select id, 'foo' as foovalue, 1 as barvalue from 'bar';

Result:

type Bar = {
  id: number
  foovalue: string | null
  barvalue: number | null
}

Expected:

type Bar = {
  id: number
  foovalue: string
  barvalue: number
}

petetnt avatar Apr 27 '23 14:04 petetnt