Re: DateDiff, IsNull?

From: Alan Gutierrez <alangutierrez(at)hotmail(dot)com>
To: Bill <bchie(at)opensys(dot)com(dot)hk>
Subject: Re: DateDiff, IsNull?
Date: 2001-08-14 06:51:33
Message-ID: Pine.WNT.4.33.0108140634400.1680-100000@CX1198465-B
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 14 Aug 2001, Bill wrote:

> Hello all,
>
> I am a newbie to postgreSQL, is it possible to write a "DateDiff",
> "IsNull" function work same as the one in SQL Server and are there and
> sample out there? And is it possible to override the existing function and
> operator like "+" to become a concate?

I don't know what IsNull does but:

template1=> select coalesce(NULL, 'Hello');
case
-------
Hello
(1 row)

I do know what DateDiff does:

template1=> select '2001-08-14'::date - '6 weeks'::interval;
?column?
------------------------
2001-07-03 00:00:00-05
(1 row)

Overloading operators? *Please* tell me that this is impossible.

Alan Gutierrez

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alan Gutierrez 2001-08-14 07:02:05 Re: on update restrict
Previous Message Tod McQuillin 2001-08-14 05:31:04 Re: Eh?