Panos Kassianidis wrote:
> Thanks very much for the answer.
> Could you also please tell me how am I supposed to write such a function?
> How is date_trunc implemented so that I can extend it? In C in SQL?
I'd probably write it in plpgsql unless you need the speed.
> And where can I find its source code?
With the source - available from the website.
--
Richard Huxton
Archonet Ltd