Re: No Documentation for to_char(INTERVAL, mask)

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, Josh Berkus <josh(at)agliodbs(dot)com>
Cc: lockhart(at)fourpalms(dot)org, Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: No Documentation for to_char(INTERVAL, mask)
Date: 2001-03-08 15:59:41
Message-ID: web-22202@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

karel,

> 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 :-)

Hey, if I wanted that, there'd be a consulting fee involved, hey?

Actually, I just changed the field to VARCHAR and provided a limited
range of options. Since there is not to_char('7 +00:00:00') yet, but
interval('1 month') works great, it makes more sense to store my data as
text.

Since I'm not writing the temporary interval2char function, I'll
mention that it seemed to me that it could be broken down into a series
of IF ... THEN statements either testing DATEPART or against other
INTERVAL values. A string could be built against the components of the
Interval.

Now, two follow-up questions:

1. Does ALTER TABLE in 7.1 beta 4 allow DROP COLUMN? I can't seem to
get it to work.

2. Has anyone given thought to a VB-style SELECT CASE (which we should
call 'SELECT MATCH') statement in PL/pgSQL? Different from the CASE
that allows you to select column values in the SELECT clause, SELECT
MATCH would be an IF ... THEN style structure offering an indefinite
numebr of options. I'm sure that PL/SQL has something like this ...
I'll look it up later today.

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Joerdens 2001-03-08 16:06:29 Re: How to drop an <unnamed> trigger
Previous Message Tom Lane 2001-03-08 15:44:37 Re: Buglet?