On Thu, 31 Aug 2023 at 23:10, Andrey M. Borodin <x4...@yandex-team.ru> wrote: > Well, as far as I know, RFC discourages extracting timestamps from UUIDs. But > we still can have such functions...maybe as an extension?
Do you know of any reason for that? > However, so far I haven't figured out how to implement optional arguments for > catalog functions. I'd appreciate any pointers here. I'd argue that the time argument shouldn't be optional. Asking the user to supply time would force them to think whether they want to go with `now()` or `clock_timestamp()` or something else. Also, a shameless plug with my extension for UUID v1 that implements extract and create from (and an opclass): https://github.com/pgnickb/uuid_v1_ops