Re: date_part vs extract - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: date_part vs extract
Date
Msg-id 200111291914.fATJEPD24332@candle.pha.pa.us
Whole thread Raw
In response to Re: date_part vs extract  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
> Markus Bertheau writes:
> 
> > I wonder about the difference between date_part('week', ...) and
> > extract(week from ...) not only but also from a performance point of
> > view. I read extract is standard and date_part is not. Backwards
> > compatibility maybe justifies the existence of date_part. Whats else?
> 
> I think date_part() was adapted from Ingres.  Btw., note that the "week"
> parameter (and most others) aren't standard either.

Yes, from Ingres.  I think Thomas added it.  Both he and I have Ingres
experience.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: date_part vs extract
Next
From: reina@nsi.edu (Tony Reina)
Date:
Subject: Can I CONSTRAIN a particular value to be UNIQUE?