Re: [HACKERS] Why is this allowed?

2007-03-10 Thread Gavin Sherry
On Sat, 10 Mar 2007, Chuck McDevitt wrote: > Ok... > > Just to be clear, the ISO SQL spec says that INTERVAL '1' DAY is the > correct way to specify a one-day interval. > That's why it is surprising that PostgreSQL treats it differently, with > no error or warning. > > The PostgreSQL syntax INTER

Re: [HACKERS] Why is this allowed?

2007-03-10 Thread Tom Lane
"Chuck McDevitt" <[EMAIL PROTECTED]> writes: > Is fixing this on the TODO list? See the 'Add ISO INTERVAL handling' entry. regards, tom lane ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [HACKERS] Why is this allowed?

2007-03-10 Thread Chuck McDevitt
s fixing this on the TODO list? -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Saturday, March 10, 2007 5:11 PM To: Gregory Stark Cc: Chuck McDevitt; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Why is this allowed? Gregory Stark <[EMAIL PROTECTED]> wri

Re: [HACKERS] Why is this allowed?

2007-03-10 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > "Chuck McDevitt" <[EMAIL PROTECTED]> writes: >> Why don't we have some kind of error check for people entering things >> like INTERVAL '1' DAY in their query, since we don't handle it. > Because it's not an error. It just doesn't mean what you think it

Re: [HACKERS] Why is this allowed?

2007-03-10 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > "Chuck McDevitt" <[EMAIL PROTECTED]> writes: > >> Why don't we have some kind of error check for people entering things >> like INTERVAL '1' DAY in their query, since we don't handle it. > > Because it's not an error. It just doesn't mean what you th

Re: [HACKERS] Why is this allowed?

2007-03-10 Thread Gregory Stark
"Chuck McDevitt" <[EMAIL PROTECTED]> writes: > Why don't we have some kind of error check for people entering things > like INTERVAL '1' DAY in their query, since we don't handle it. Because it's not an error. It just doesn't mean what you think it means. You've requested an interval measured

[HACKERS] Why is this allowed?

2007-03-10 Thread Chuck McDevitt
Why don't we have some kind of error check for people entering things like INTERVAL '1' DAY in their query, since we don't handle it. select now() =now() + interval '1' day; ?column? -- T This seems scary... We allow something through and then ignore it? "Interval '1 day'