From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: Updated interval patches - ECPG [was, intervalstyle....] |
Date: | 2008-11-12 22:28:56 |
Message-ID: | 491B58A8.6060303@cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
>> Once this settles I suppose I should post a ECPG patch that's based
>> off of these Decode/Encode interval functions too?
>
> Yeah, if you want. I think you'll find that the datetime code has
> drifted far enough since ecpg forked it that you'll be looking at a
> pretty huge diff :-(
Merging of the interval style into ecpg attached.
I blindly copy&pasted code from src/backend/utils/adt/datetime.c
into src/interfaces/ecpg/pgtypeslib/interval.c and made the minimal
changes (pg_tm -> tm; adding constants; etc) to make the regression
tests pass; and mentioned that in the comments.
I know little enough about ecpg that I can't really tell if these changes
are for the better or worse.
One thing in the patch that's probably a bug is that the
constants in src/include/utils/dt.h and src/include/utils/datetime.h
under the section "Fields for time decoding" seem not to match, so
when I copied some constants from datetime.h to dt.h to make it compile
the values I copied are probably wrong. Unfortunately I know little
about ecpg or the history of dt.h to know what the right values should
be.
Attachment | Content-Type | Size |
---|---|---|
ecpg_interval-c.patch.gz | application/x-gzip | 9.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tony Fernandez | 2008-11-12 22:52:07 | ERROR: incompatible library |
Previous Message | Tom Lane | 2008-11-12 21:25:44 | Re: Reducing some DDL Locks to ShareLock |