> I think it is important that epgsql does not do conversions by default for
> compatibility, but also because that approach can be desirable in certain
> situations. If epgsql does convert types, it would be best to do so based
> on some configuration flag, so the conversions don't happen automatically.
> If the conversions don't occur it may be better for GC behavior, depending
> on the size of the binaries that are returned (greater than 64 bytes would
> make this matter,
>
http://www.erlang.org/doc/efficiency_guide/binaryhandling.html#id65218).
Well all types are converted to *something* from the binary format
they arrive in, if you're doing an 'equery', rather than an 'squery'.
The trick is deciding what to convert to.
Ultimately, this is an Erlang problem, because Erlang attaches no
information to erlang:now() and erlang:date() that allows you to
distinguish one from the other. This is a problem if you don't know
exactly what generated your data, which is of course the case in more
loosely coupled systems.
> Anyway, you shouldn't need to be concerned about epgsql supporting the
> conversion when using Chicago Boss, since boss_db is suppose to be doing the
> conversion for you. It has been awhile since I have used boss_db and there
> have been various changes to it, since I used it last, but you should be
> able to use a timestamp value to handle dates. I understand there is a
> problem when you care about dates previous to 1970, which might be part of
> the issue. You can always handle the date conversion yourself or modify
> boss_db to improve this though.
Yeah, it's probably best to put it in boss_db. We're changing enough
things as it is.