Reputation: 31
After I was trying to INSERT
into a postgresql
database simple statement from Go app this error was occurred. I've already made type assertions for int(value)
, but without luck.
Upvotes: 1
Views: 2452
Reputation: 31
I have resolved this problem by removing single quotes from my INSERT
statement.
insert into kids (age,user_id) values ($1,$2);
instead of
insert into kids (age,user_id) values ('$1','$2');
Upvotes: 2