Re: [BUGS] Time intervals in select statement

2004-10-19 Thread Tom Lane
Luke McFarlane <[EMAIL PROTECTED]> writes: > It's interesting why addition assumes one operand is interval while > subtraction assumes it is timestamp? It should at least be consistent, IMHO. There is no timestamp + timestamp operator, for reasons that should be fairly apparent. There are both t

Re: [BUGS] Time intervals in select statement

2004-10-19 Thread Luke McFarlane
Tom Yes, that does indeed work. It's interesting why addition assumes one operand is interval while subtraction assumes it is timestamp? It should at least be consistent, IMHO. Cheers Luke Tom Lane wrote: Luke McFarlane <[EMAIL PROTECTED]> writes: SELECT create_time, create_time - '8 days 16:4

Re: [BUGS] Time intervals in select statement

2004-10-19 Thread Tom Lane
Luke McFarlane <[EMAIL PROTECTED]> writes: > SELECT create_time, create_time - '8 days 16:49:22.600601' FROM foo; > ERROR: invalid input syntax for type timestamp: "8 days 16:49:22.600601" Cast the constant to interval explicitly. regards, tom lane -