Postgresql stores boolean value TRUE or FALSE, while I am passing 1 or 0. And I want to store as 1 or 0 instead of TRUE or FALSE.
Can anyone help me on this please?
Postgresql stores boolean value TRUE or FALSE, while I am passing 1 or 0. And I want to store as 1 or 0 instead of TRUE or FALSE.
Can anyone help me on this please?
You might have made data type as Boolean
If you want to save as 1 and 0 only, then you should make data type as Small Int
Then you will be able to save as 1 or 0 and retrieve the same.
TRUEandFALSE? Also,SELECT TRUE::integer, FALSE::integer;– András Váczi Aug 11 '16 at 12:47