From: Mark Dilger <pgsql@markdilger.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [SQL] Interval subtracting
Date: Thu, 02 Mar 2006 10:06:26 -0800
Message-ID: <44073422.7060606@markdilger.com> (raw)
In-Reply-To: <2476.1141310972@sss.pgh.pa.us>
References: <200603012326.k21NQOv08610@candle.pha.pa.us>
<4406331A.6080307@markdilger.com>
<17317.1141257505@sss.pgh.pa.us>
<44063632.20505@markdilger.com>
<17752.1141259857@sss.pgh.pa.us>
<440647D4.9060601@markdilger.com>
<2476.1141310972@sss.pgh.pa.us>
I've written the interval_justify() function but the parser does not know about
it yet. I changed these files:
backend/utils/adt/timestamp.c
include/catalog/pg_proc.h
include/utils/timestamp.h
I used grep -R to find all locations where interval_justify_time is mentioned,
and for each one added an analogous entry for my new function interval_justify.
But I get lost where OID=1175 is associated with interval_justify_time. I
can't really just grep for 1175 and add analogous entries of my new OID, because
I don't know what all the tables mean. (BTW, I grabbed the next slot in the
table and used OID=2711, but I don't know if that is the proper strategy for
adding new OIDs.)
Is there an automated way of handling this task, such as a developer tool that I
didn't find?
mark
Index: include/catalog/pg_proc.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/catalog/pg_proc.h,v
retrieving revision 1.399
diff -r1.399 pg_proc.h
1464a1465,1466
> DATA(insert OID = 2711 ( justify PGNSP PGUID 12 f f t f i 1
1186 "1186" _null_ _null_ _null_ interval_justify - _null_ ));
> DESCR("promote groups of 24 hours to numbers of days and promote groups of 30
days to numbers of months");
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pgsql@markdilger.com, tgl@sss.pgh.pa.us
Subject: Re: [SQL] Interval subtracting
In-Reply-To: <44073422.7060606@markdilger.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox