Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Well, that certainly belongs in the 'bizarre' category. It should not
> accept that syntax. It should require the 'month' or 'minute' to be in
> single quotes.
No, it shouldn't; read the SQL spec. AFAICS the syntax
select interval '1' month
is perfectly spec-compliant. The variant
select interval '1 month'
is *not* per-spec, it is a Postgres-ism.
Tom Lockhart was working on this stuff shortly before he decided that
raising horses was a more interesting use of his spare time. It doesn't
look like he ever quite finished. I tried several back versions of
Postgres to see if it had ever operated correctly and the answer seems
to be "no" :-( ... although we have managed to fail in more than one
way over the years ...
regards, tom lane