[Bucardo-general] coercing postgresql timestamp to mongo timestamps

Ali Asad Lotia ali at anobii.com
Thu May 3 18:27:58 UTC 2012


Hello All,
Please find attached a patch that coerces PostgreSQL timestamps to
MongoDB Date values. At present, timestamps are added to MongoDB as
strings. If this patch is applied, running Bucardo with a MongoDB
target will require the DateTime-Format-Pg module
http://search.cpan.org/dist/DateTime-Format-Pg/. It may be preferable
to only require it if synced tables in the source DB have datetime
columns.

The commit message I have used in my local Git repo is:

Author: Mark Schaschke and Ali Asad Lotia <ali.asad.lotia at anobii.com>
Date:   Thu May 3 19:00:32 2012 +0100

Coerce timestamp types to Mongo Date type

timestamps are now coerced to Mongo Date types. If the timestamp
is floating, then it is set to UTC.

Best,
Ali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coerce_mongo_dates.patch
Type: application/octet-stream
Size: 1360 bytes
Desc: not available
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20120503/8d7687a3/attachment.obj>


More information about the Bucardo-general mailing list