[database-devel] ByteString and Text - any conventions?

Janne Hellsten jjhellst at gmail.com
Tue Aug 14 00:13:35 CEST 2012

On Mon, Aug 13, 2012 at 11:18 PM, Leon Smith <leon.p.smith at gmail.com> wrote:
> As an aside some people (Joey Adams IIRC, maybe others) have suggested that
> postgresql-simple should change the conversions so that ByteString
> represents postgresql's binary blobs,  and not postgresql's text.   (And get
> rid of the Binary type in the process)

I like this idea.  I went for this approach in my latest github version.

> I don't think that API compatibility between the *-simples should be high
> priority;   do whatever you think is best for sqlite-simple.   Then
> hopefully in a few years we'll have some well-developed database-specific
> interfaces that can inform a next-generation HDBC interface.

I agree and I've somewhat departed from the postgresql-simple API
already.  I also abandoned the query parser that was used for query
parameter substitution.  Instead I bind query parameters directly
using SQLite's prepared statement parameter binding.  This is good in
that SQLite is the only one parsing the query string, so perhaps there
will be less potential for bugs as I'm not rolling my own parser or
escaping.  The downside is that supporting the 'In' type for ToField
becomes much trickier (in fact, I don't currently know how to
implement that..)  But it's a lot simpler now.


More information about the database-devel mailing list