Leon P Smith

Results 259 comments of Leon P Smith

Actually, I think I'm going to leave this issue open for now, as this actually does bring up some issues that should be worked on... like re-implementing libpq's escape routines,...

Indeed. You can add support for these types in your own projects by writing appropriate Haskell data types and associated FromField/ToField instances. Supporting this type of extensionality was a key...

You can't derive ToField/FromField instances, as you need to know the syntax that postgresql recognizes and emits. See for example the documentation for the [FromField](https://hackage.haskell.org/package/postgresql-simple-0.4.10.0/docs/Database-PostgreSQL-Simple-FromField.html) module.

Well, that looks like it should work, if you are careful. I'm not sure that I'd recommend adding an FromField instance for tuples though, because they already have FromRow instances....

The Raw type and instance I gave above will show you the ascii syntax that postgresql is returning. (Unfortunately, all data is returned in a textual format with postgresql-simple... I'd...

Yes, this is an unfortunate defect inherited from mysql-simple. And I'm fully aware that it's been in every release of postgresql-simple. Thanks for the workaround, I hadn't worked out all...

Well, if your application is mostly dynamic sql, then perhaps it would make sense to avoid the existing interpolator altogether. The escaping functions are exported in `Internal`, and as part...

Well, postgresql-simple has the `query_` family of functions that avoid interpolation altogether. I'm hoping that once postgresql-simple implements the plan outlined above, that the existing interpolator will be much less...

They aren't. It'd be nice to add support for protocol level parameters, but unfortunately it's not as simple as it should be (for some entirely silly reasons on postgresql's part)....

If one is desperate for protocol-level parameters for a select few queries though, you certainly could use the `Internal.withConnection` and `postgresql-libpq` for that. It's not pretty, but it would avoid...