Why is this allowed? - Mailing list pgsql-hackers

From Chuck McDevitt
Subject Why is this allowed?
Date
Msg-id EB48EBF3B239E948AC1E3F3780CF8F8801D7842E@MI8NYCMAIL02.Mi8.com
Whole thread Raw
Responses Re: Why is this allowed?
List pgsql-hackers

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’” or “interval ‘1 day’ day “ both work.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Race condition in pg_database_size()
Next
From: Gregory Stark
Date:
Subject: Re: Why is this allowed?