ajfriend / pdx

3 stars 0 forks source link

macros for better conversion from interval to milliseconds #11

Open ajfriend opened 1 year ago

ajfriend commented 1 year ago
create schema if not exists pdx;
create or replace macro pdx.interval_to_ms(x) as extract('epoch' from x::interval)*1000 + mod(extract('milliseconds' from x::interval), 1000);
ajfriend commented 1 year ago

https://discord.com/channels/909674491309850675/921073327009853451/1058153742811279420