Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

[POSTGRES] Double precision cause syntaxe error #210

Open
fbaldo31 opened this issue Oct 16, 2019 · 2 comments
Open

[POSTGRES] Double precision cause syntaxe error #210

fbaldo31 opened this issue Oct 16, 2019 · 2 comments
Labels
bug no known workaround

Comments

@fbaldo31
Copy link

I have a column setup as double precision data type without any precision number specified.
But a 53 precision is used as default which is bad for PostgreSQL.

The generated Typescript is

@Column('double precision', {
        nullable: true,
        precision: 53,
        })

So the create table script contains

"myColumn" double precision(53),

Here is the error thrown by PostgreSQL syntax error on or near "("

Precision number is not supported by PostgreSQL it is defined as 15 decimal digits precision according to the documentation


typeorm-model-generator version 0.3.5
PostgreSQL version 11
typeorm version 0.2.19

@Kononnable Kononnable added the bug no known workaround label Nov 3, 2019
@fafamnzm
Copy link

fafamnzm commented Jan 7, 2021

Regarding this issue, The funny thing is it saves type float as double precision!

@cefimenda
Copy link

float8 still gets converted to double precision(53), which throws the mentioned Postgres error. Will this issue be resolved any time soon?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug no known workaround
Projects
None yet
Development

No branches or pull requests

4 participants