Re: strftime

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Egor Shipovalov <pgsql_list(at)eonline(dot)ru>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: strftime
Date: 2003-08-22 04:47:14
Message-ID: 3F45A052.3050302@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Egor Shipovalov wrote:

> I'm wondering how hard will it be to implement POSIX strftime function and
> what's the best way to go about it? I hooked up similar functions to MySQL
> in the past and all it took was little modification to example C code,
> compiling it as a shared library and issuing one SQL statement. What's the
> PostgreSQL's way to do it?

You can write wrappers for any C function:

http://www.postgresql.org/docs/7.3/static/xfunc-c.html

But PostgreSQL may be able to already to what you want using TO_CHAR():

http://www.postgresql.org/docs/7.3/static/functions-formatting.html

Hope that helps,

Mike Mascari
mascarm(at)mascari(dot)com

In response to

  • strftime at 2003-08-22 04:32:26 from Egor Shipovalov

Browse pgsql-general by date

  From Date Subject
Next Message Gregory S. Williamson 2003-08-22 04:54:50 Re: Example Database
Previous Message Egor Shipovalov 2003-08-22 04:32:26 strftime