470,614 Members | 1,417 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

strftime

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?

Best regards,
Egor Shipovalov.
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #1
1 3257
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/s...ormatting.html

Hope that helps,

Mike Mascari
ma*****@mascari.com

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Richard Shea | last post: by
4 posts views Thread by John Hunter | last post: by
4 posts views Thread by Andy Leszczynski | last post: by
1 post views Thread by Dennis Benzinger | last post: by
3 posts views Thread by HSeganfredo | last post: by
2 posts views Thread by Giovanni Bajo | last post: by
3 posts views Thread by Andrii V. Mishkovskyi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.