Closed sonowz closed 6 years ago
Well, postgresql-simple itself doesn't use any unsafe memory operations, so (outside some kind of weird race condition, if you are using postgresql-simple concurrently) I don't see how this can be postgresql-simple's problem. I suppose there could be a problem in postgresql-libpq, but it could also pretty easily be in libpq, GHC, or some integration problem thereof.
I don't use Windows much, so I'm not going to be of much help here. Good luck!
Oh, I thought there was C binding code in this repo.
I tried changing GHC version to 7 (which means downgrading cabal too), but had no luck.
libpq.dll
works fine when I use it through psql
, so I'm now suspecting either postgresql-libpq
or GHC
.
I can't still figure out what's wrong, but it seems obvious this bug has nothing to do with postgresql-simple
, so I'm closing it.
Thanks for commenting!
Hello, I have a runtime error when running this code. (brought from first tutorial code in here for demo purpose.)
where running this yields
notice that "wrote 4" didn't print, so the issue would lie in
query_
. (I set flush with newline.)I suggest this issue arises from converting SQL query result into Haskell value, regardless of types. (I tried with
Int
,String
, andText
type.) Also, when I try query likeSELECT * FROM empty_table
, the program runs without error.The cause of the issue might be 32bit/64bit, since the address
000000008000fb50
is not accessible in 32bit space. (It is kernel space!) I don't know how Haskell runs in low-level, so I'm posting here for help.Seems like this guy had same issue with me.
Environment:
All programs are installed as 64-bit, at least I tried so.