> > I can add days to now(), but not subtract?
The problem is that it is meaningful to subtract two absolute times,
giving a delta time as a result, *and* it is meaningful to subtract a
delta time from an absolute time, giving another absolute time as a
result.
So your unspecified field could be either one, and Postgres can't
decide what it should be for you ;)
The error message is intentionally vague, since by the time the
message is printed the parser has lost track of whether there were
zero candidates or too many candidates.
- Thomas
> > =====================================
> >
> > template1=> select now() + '30 days';
> > ?column?
> > ------------------------------
> > Sun Feb 13 22:00:33 2000 AST
> > (1 row)
> >
> > template1=> select now() - '30 days';
> > ERROR: Unable to identify an operator '-' for types 'timestamp' and 'unknown'
> > You will have to retype this query using an explicit cast
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California