Jeff,

> Why not just include examples of DATEDIFF and DATEADD functions?
> For example:
> CREATE FUNCTION datediff(timestamp, timestamp)
> RETURNS integer AS '
> BEGIN
> RETURN $2 - $1;
> END;
> ' LANGUAGE 'plpgsql';

Not a bad idea.  Unfortunately, DATEDIFF & DATEADD are more complicated
than that.  More importantly, I don't want to get into Function design
in this article, which is aimed at newbies.

If, however, anyone *does* have an online sample of one or both of these
two functions, I'd love to link to it from the article.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      [EMAIL PROTECTED]
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to