Re: No Documentation for to_char(INTERVAL, mask) - Mailing list pgsql-sql

From Josh Berkus
Subject Re: No Documentation for to_char(INTERVAL, mask)
Date
Msg-id 3AA66401.6A00BBEC@agliodbs.com
Whole thread Raw
In response to No Documentation for to_char(INTERVAL, mask)  (Josh Berkus <josh@agliodbs.com>)
Responses Re: No Documentation for to_char(INTERVAL, mask)
List pgsql-sql
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
informationtechnology      josh@agliodbs.com   and data management solutions       (415) 565-7293  for law firms, small
businesses      fax  621-2533   and non-profit organizations.       San Francisco
 


pgsql-sql by date:

Previous
From: Karel Zak
Date:
Subject: Re: sql functions and triggers
Next
From: Tom Lane
Date:
Subject: Re: AW: Problems with RULE