From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bug in date arithmetic |
Date: | 2009-08-24 20:19:10 |
Message-ID: | 6196.1251145150@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> I wonder if we could get around this by inventing a new type
> date_or_interval which looks at the input and decides which it is
> using fairly strict rules. date_sub would take that type and do the
> appropriate operation based on what the constant had in it.
Ick. This would be a pretty enormous blot on the type system to solve
one special case, in a manner that would only be helpful to newbies
who don't know that they ought to cast to eliminate the ambiguity.
In fact it sounds quite a bit like the implicit-cast-to-text situations
we just finished getting rid of ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2009-08-24 20:35:29 | Re: Bug in date arithmetic |
Previous Message | Peter Eisentraut | 2009-08-24 20:17:23 | Re: Feedback about Drupal SQL debugging |