go-gorm / postgres

GORM PostgreSQL driver
MIT License
228 stars 120 forks source link

write value Nan error #172

Open nuage32 opened 1 year ago

nuage32 commented 1 year ago

insert NaN error:

2023-03-29 18:27:55.398 CST [654503] new@new ERROR: column "nan" does not exist at character 30483

insert into products (price) values(NaN)

in database: Table "public.products" Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+-------------------------------------- id | integer | | not null | nextval('products_id_seq'::regclass) price | numeric | | |

insert into products (price) values(NaN);

ERROR: column "nan" does not exist LINE 1: insert into products (price) values(NaN); ^

insert into products (price) values('NaN');

INSERT 0 1