PostgreSQL - can't save items - "type integer but expression is of type character"

Posted by user984621 on Stack Overflow See other posts from Stack Overflow or by user984621
Published on 2012-03-29T23:25:44Z Indexed on 2012/03/29 23:29 UTC
Read the original article Hit count: 375

Filed under:
|
|
|

I am getting still over and over again this error, the column age has the type integer, I am saving into this column integer-value, I also tried to don't save nothing into this column, but still getting this error...

Could anyone help me, how to fix that?

PG::Error: ERROR:  column "age" is of type integer but expression is of type character varying at character 102
HINT:  You will need to rewrite or cast the expression.
: INSERT INTO "user_details" ("created_at", "age", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id"

© Stack Overflow or respective owner

Related posts about types

Related posts about integer