Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27Gd5x00486 for ; Wed, 7 Mar 2001 11:39:05 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [207.172.28.154] (HELO agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.4.1) with ESMTP id 21587; Wed, 07 Mar 2001 08:39:00 -0800 Message-ID: <3AA66401.6A00BBEC@agliodbs.com> Date: Wed, 07 Mar 2001 08:38:25 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions X-Mailer: Mozilla 4.73 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: lockhart@fourpalms.org CC: Karel Zak , sqllist Subject: Re: No Documentation for to_char(INTERVAL, mask) 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/145 X-Sequence-Number: 1797 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. I'll take a stab at in in PLPGSQL and post the results. -Josh Berkus -- ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco