go-gorm / go-gorm/postgres

write value Nan error

Open
#172 0 comments 0 reactions 1 assignee Claimed by @jinzhu View on GitHub
Dominant language
Go
Stars
297
Forks
155
Avg merge
27m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.