Received: from ara.zf.jcu.cz (ara.zf.jcu.cz [160.217.161.4]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f289pCx99023 for ; Thu, 8 Mar 2001 04:51:20 -0500 (EST) (envelope-from zakkr@zf.jcu.cz) Received: (from zakkr@localhost) by ara.zf.jcu.cz (8.9.3/8.9.3/Debian 8.9.3-21) id KAA27397; Thu, 8 Mar 2001 10:51:03 +0100 Date: Thu, 8 Mar 2001 10:51:03 +0100 From: Karel Zak To: Josh Berkus Cc: lockhart@fourpalms.org, Karel Zak , sqllist Subject: Re: No Documentation for to_char(INTERVAL, mask) Message-ID: <20010308105103.A25863@ara.zf.jcu.cz> References: <3AA469E9.DCFFC0AE@agliodbs.com> <20010306091316.B6115@ara.zf.jcu.cz> <3AA51CD1.8A55F64F@agliodbs.com> <20010307112335.A6373@ara.zf.jcu.cz> <3AA6424D.AE3AE0A1@alumni.caltech.edu> <3AA66401.6A00BBEC@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: <3AA66401.6A00BBEC@agliodbs.com>; from josh@agliodbs.com on Wed, Mar 07, 2001 at 08:38:25AM -0800 X-Archive-Number: 200103/171 X-Sequence-Number: 1824 On Wed, Mar 07, 2001 at 08:38:25AM -0800, Josh Berkus wrote: > Thomas, Karel, > > > I agree with Karel's point that it may be a pain to use a procedural > > language to manipulate a "stringy" interval value. If you use a C > > function instead, you can get access to the internal manipulation > > functions already present, as well as access to system functions to > > manipulate a tm structure. > > Ah, but this leaves out two important considerations of my particular > problem: > > 1. The interval I want to manipulate is limited to a relative handful of > possibilities (it's a billing interval): 1 week, 2 weeks, 2x/Month, 1 > month, 2 months, 3 months. > > 2. I don't do C. And I don't have the budget to hire somebody to di it > in C. > > If this was a bigger budget project, I'd simply take Karel's notes and > hire a programmer to create the to_char(Interval) function and thus > contribute to PostgreSQL ... but this project is over budget and behind > schedule already. Now I'm not writing to_char(interval), because current source (7.1) is freeze for new features and I'm waiting for 7.2 devel. cycle and I'm spending time with other things (PL/Python, the Mape project etc..). If it's *really important* for you I can write it next week(s), ... of course, my time is limited :-) May be try found some other solution. Karel -- Karel Zak http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz