Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fATJEdm02618 for ; Thu, 29 Nov 2001 14:14:39 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id fATJEPD24332; Thu, 29 Nov 2001 14:14:25 -0500 (EST) From: Bruce Momjian Message-Id: <200111291914.fATJEPD24332@candle.pha.pa.us> Subject: Re: date_part vs extract In-Reply-To: "from Peter Eisentraut at Nov 29, 2001 08:04:34 pm" To: Peter Eisentraut Date: Thu, 29 Nov 2001 14:14:25 -0500 (EST) CC: Markus Bertheau , postgres sql list X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200111/415 X-Sequence-Number: 5797 > 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, Pennsylvania 19026