You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Postgres can't handle strings with \0 in them. However, they are valid Haskell Text and String values. If you pass one to a postgres-simple query, the string will be silently truncated after the null.
Prelude Database.PostgreSQL.Simple Data.Text> execute conn "insert into program (name, environment) values (?,?);" ("this string \0 is cut off","echo")
1
Prelude Database.PostgreSQL.Simple Data.Text> query_ conn "select * from program" :: IO ([(Int, Text, Text)])
[(7,"this string ","echo")]
I'm not sure the best way to handle this. The simplest thing is to throw an exception.
The text was updated successfully, but these errors were encountered:
Postgres can't handle strings with \0 in them. However, they are valid Haskell
Text
andString
values. If you pass one to apostgres-simple
query, the string will be silently truncated after the null.I'm not sure the best way to handle this. The simplest thing is to throw an exception.
The text was updated successfully, but these errors were encountered: