[HACKERS] Time span conversion function

2005-01-14 Thread Brendan Jurd
I've got an idea for a new internal function. I'm more than willing to code it myself, but I'd like to run it past the list and thrash out any conceptual issues before I get too excited about writing a patch. When dealing with time values, it's not unknown to want to see a particular time

Re: [HACKERS] Time span conversion function

2005-01-14 Thread Kris Jurka
On Sat, 15 Jan 2005, Brendan Jurd wrote: SELECT time_span( 'minute', now(), interval '10:43:55' ); 643 The timestamp argument to this version of the function seems completely irrelevent. Kris Jurka ---(end of broadcast)--- TIP 2: you can

Re: [HACKERS] Time span conversion function

2005-01-14 Thread Brendan Jurd
Kris Jurka wrote: On Sat, 15 Jan 2005, Brendan Jurd wrote: SELECT time_span( 'minute', now(), interval '10:43:55' ); 643 The timestamp argument to this version of the function seems completely irrelevent. Kris Jurka I don't think so. As I pointed out in the OP, to make this function

Re: [HACKERS] Time span conversion function

2005-01-14 Thread Tom Lane
Brendan Jurd [EMAIL PROTECTED] writes: Of course, it would be possible to create a shorthand version of the function which expects (text, interval), and passes directly to time_span($1, now(), $2). This bothers me a bit. That essentially says that (text, interval) has a hidden instability:

Re: [HACKERS] Time span conversion function

2005-01-14 Thread Brendan Jurd
Tom Lane wrote: Brendan Jurd [EMAIL PROTECTED] writes: Of course, it would be possible to create a shorthand version of the function which expects (text, interval), and passes directly to time_span($1, now(), $2). This bothers me a bit. That essentially says that (text, interval) has a