Re: [Haskell-cafe] Takusen, postgres and boolean fields

2009-04-25 Thread Alistair Bayley
2009/4/25 Sasha Shipka : > When I did SELECT statement I handled boolean field as String, and > convert it to Bool. > However when I did update or insert, I must bind those values, then > takusen calls foreign postgres library and function with "?" and > values of proper type. So I cannot use neith

Re: [Haskell-cafe] Takusen, postgres and boolean fields

2009-04-25 Thread Sasha Shipka
When I did SELECT statement I handled boolean field as String, and convert it to Bool. However when I did update or insert, I must bind those values, then takusen calls foreign postgres library and function with "?" and values of proper type. So I cannot use neither Bool neither String in bindP. I

Re: [Haskell-cafe] Takusen, postgres and boolean fields

2009-04-25 Thread Christoph Bauer
Sasha Shipka writes: > Let say one has to do something similar to this: > > execDML $ cmdbind (sql "update some_table set some_boolean_field = ? > where ...") [bindP True, ...] > > When I do it, I have an error: > > DBError ("42","804") 7 "ERROR: 42804: column \"some_boolean_field\" > is of type

[Haskell-cafe] Takusen, postgres and boolean fields

2009-04-24 Thread Sasha Shipka
Let say one has to do something similar to this: execDML $ cmdbind (sql "update some_table set some_boolean_field = ? where ...") [bindP True, ...] When I do it, I have an error: DBError ("42","804") 7 "ERROR: 42804: column \"some_boolean_field\" is of type boolean but expression is of type tex