X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 820739DC993 for ; Thu, 2 Mar 2006 14:07:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26287-03 for ; Thu, 2 Mar 2006 14:07:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 0DDE19DC81F for ; Thu, 2 Mar 2006 14:07:08 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 0C13030AF9; Thu, 2 Mar 2006 19:07:08 +0100 (MET) From: Mark Dilger X-Newsgroups: pgsql.hackers Subject: Re: [SQL] Interval subtracting Date: Thu, 02 Mar 2006 10:06:26 -0800 Organization: Hub.Org Networking Services Lines: 32 Message-ID: <44073422.7060606@markdilger.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Tom Lane User-Agent: Mozilla Thunderbird 1.0 (X11/20050130) X-Accept-Language: en-us, en In-Reply-To: <2476.1141310972@sss.pgh.pa.us> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-hackers@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.102 required=5 tests=[AWL=0.102] X-Spam-Score: 0.102 X-Spam-Level: X-Archive-Number: 200603/131 X-Sequence-Number: 80529 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");