Re: date_part vs extract

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Markus Bertheau <twanger(at)bluetwanger(dot)de>
Cc: postgres sql list <pgsql-sql(at)postgresql(dot)org>
Subject: Re: date_part vs extract
Date: 2001-11-29 19:04:34
Message-ID: Pine.LNX.4.30.0111291724360.609-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2001-11-29 19:14:25 Re: date_part vs extract
Previous Message Tony Reina 2001-11-29 19:01:11 Can I CONSTRAIN a particular value to be UNIQUE?