Re: date_part vs extract - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: date_part vs extract
Date
Msg-id Pine.LNX.4.30.0111291724360.609-100000@peter.localdomain
Whole thread Raw
In response to date_part vs extract  (Markus Bertheau <twanger@bluetwanger.de>)
Responses Re: date_part vs extract  (Bruce Momjian <pgman@candle.pha.pa.us>)
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.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: PL/pgSQL loops?
Next
From: Bruce Momjian
Date:
Subject: Re: date_part vs extract