Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz> writes:
> not use cache - hmm.. but I like fast routines (my current
> to_char() implementation is faster (20-50%) than current
> date_part()).
I like that one. Anything else is a potential memory leak, and I really
find it hard to believe that the speed of to_char() itself is going to
be a critical factor in a real-world application. You have client-to-
backend communication, parsing, planning, I/O, etc that are all going
to swamp out the cost of a single function.
regards, tom lane