Re: Dateadd - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Dateadd
Date
Msg-id web-52014@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Dateadd  (Cliff Crawford <cjc26@cornell.edu>)
Responses Re: Dateadd
List pgsql-sql
Folks,
FYI - this difference in syntax is because PostgreSQL implements real
SQL operators (i.e. what the operator does and what arguments it takes
depend on the data types involved) and Microsoft does not (in MS SQL,
operators mean the same thing for almost all data types).
Speaking of which, why doesn't PostgreSQL allow the use of "+" between
two VARCHARs to mean the same as "||" ?  Is there an addition operation
for PgSQL for VARCHAR other than concatination?

-Josh


> > I need to know if there is a sql function implemented in postgres
> that gives
> > me a date plus any number of days, months or years (the traditional
> dateadd
> > function) or how to do it in sql?


______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: '13 months ago'::reltime
Next
From: "Josh Berkus"
Date:
Subject: Need help with search-and-replace