Re: [HACKERS] EXTRACT broken

2001-10-14 Thread Thomas Lockhart
> > Oh yeah. We don't have a date_part(units, time) function defined, so it > > is getting converted to interval (which in other contexts *does* have > > some usefulness as a "time equivalent"). > You're going to have an extremely hard time convincing me of that. OK, thanks for the warning. I'll

Re: [HACKERS] EXTRACT broken

2001-10-13 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > I had figured that time would be cast to timestamp. How would you do that? With no date available, you're short all the high-order bits ... regards, tom lane ---(end of broadcast)

Re: [HACKERS] EXTRACT broken

2001-10-13 Thread Peter Eisentraut
Tom Lane writes: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > I had figured that time would be cast to timestamp. > > How would you do that? With no date available, you're short all the > high-order bits ... For the purpose of extracting the fields that time does provide, namely hour, min

Re: [HACKERS] EXTRACT broken

2001-10-13 Thread Peter Eisentraut
Thomas Lockhart writes: > Oh yeah. We don't have a date_part(units, time) function defined, so it > is getting converted to interval (which in other contexts *does* have > some usefulness as a "time equivalent"). You're going to have an extremely hard time convincing me of that. > We could fair

Re: [HACKERS] EXTRACT broken

2001-10-12 Thread Thomas Lockhart
> > > peter=# SELECT EXTRACT(DOW FROM TIME '20:38:40'); > > > ERROR: Interval units 'dow' not recognized > > > The expression is nonsensical, but so is the result. > > Hmm. Why is the result nonsensical? "day of week" does not have meaning > > for intervals, so it should not be recognized, right?

Re: [HACKERS] EXTRACT broken

2001-10-11 Thread Peter Eisentraut
Thomas Lockhart writes: > > peter=# SELECT EXTRACT(DOW FROM TIME '20:38:40'); > > ERROR: Interval units 'dow' not recognized > > The expression is nonsensical, but so is the result. > > Hmm. Why is the result nonsensical? "day of week" does not have meaning > for intervals, so it should not be r

Re: [HACKERS] EXTRACT broken

2001-10-10 Thread Thomas Lockhart
> Just updated... > peter=# SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40'); > ERROR: Timestamp with time zone units 'dow' not recognized > This is documented to work. Ah, I broke this with some recent additions to implement more ISO conventions (I changed the behavior of the date/time