From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Karel Zak <zakkr@zf.jcu.cz>
To: Josh Berkus <josh@agliodbs.com>
Cc: sqllist <pgsql-sql@postgresql.org>
Subject: Re: No Documentation for to_char(INTERVAL, mask)
Date: Wed, 07 Mar 2001 14:14:37 +0000
Message-ID: <3AA6424D.AE3AE0A1@alumni.caltech.edu> (raw)
References: <3AA469E9.DCFFC0AE@agliodbs.com>
<20010306091316.B6115@ara.zf.jcu.cz>
<3AA51CD1.8A55F64F@agliodbs.com>
<20010307112335.A6373@ara.zf.jcu.cz>
> > Given the lack of to_char(interval), I'd like to write a PLPGSQL
> > function to fill the gap in the meantime...
> I mean is too much difficult write a 'interval' to_char() version in
> some procedural language without access to real (internal) form of
> 'interval'.
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.
A combination of contrib/ and src/backend/utils/adt/ information could
give you a start on the C implementation (and that is rather easily
moved into the backend later).
I haven't tried the PL/PGSQL approach however. If you decide to proceed
on that, let us know how it goes!
- Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: lockhart@alumni.caltech.edu, zakkr@zf.jcu.cz, josh@agliodbs.com
Subject: Re: No Documentation for to_char(INTERVAL, mask)
In-Reply-To: <3AA6424D.AE3AE0A1@alumni.caltech.edu>
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>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox