[Bucardo-general] Date/Time values

Jost Boekemeier jost.boekemeier at gmail.com
Mon Jan 28 13:17:45 UTC 2013


Hello,

given the following table

CREATE TABLE invoice_download_log
(

...
  CONSTRAINT invoice_download_log_pkey PRIMARY KEY (invoice_id, moment),
)

bucardo crashes when coercing moment from text to a timestamptz:


I am using Bucardo 4.4.0 (with a ignore non-primary key patch). In this
version it appears that date time values are converted to text:

     INSERT INTO bucardo.bucardo_delta(tablename,rowid,rowid2) VALUES
(TG_RELID, NEW."invoice_id"::text,NEW."moment"::text);

Which results in the following crash: #

2013-01-28 14:11:11 CET ERROR:  date/time field value out of range:
"28.01.2013 11:48:17.29109 CET"
2013-01-28 14:11:11 CET HINT:  Perhaps you need a different "datestyle"
setting.


=>

2013-01-28 14:11:11 CET STATEMENT:
                        SELECT    DISTINCT ON (d.rowid,
t.invoice_id,t.moment) d.rowid AS "BUCARDO_ID",d.rowid2 AS "BUCARDO_ID2",
                                  t.invoice_id,t.moment ,person_id AS
person_id,ip AS ip
                        FROM      bucardo.bucardo_delta d
                        LEFT JOIN public.invoice_download_log t ON
(t.invoice_id::int4 = d.rowid::int4 AND t.moment::timestamptz =
d.rowid2::timestamptz)
                        WHERE     d.tablename = 447859494::oid
                        AND       NOT EXISTS (
                                        SELECT 1
                                        FROM   bucardo.bucardo_track bt
                                        WHERE  d.txntime = bt.txntime
                                        AND    bt.targetdb =
'presentec_sync'::text
                                        AND    bt.tablename = 447859494::oid
                                  )


select d.rowid2 from bucardo.bucardo_delta d where d.rowid2 is not null and
d.tablename=447859494::oid;
             rowid2
--------------------------------
 28.01.2013 11:48:17.29109 CET
 ...

Are fixes for these bugs already available for the latest version?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130128/73307a7f/attachment.html>


More information about the Bucardo-general mailing list