Received: from habanero.hesketh.net (habanero.hesketh.net [66.45.6.196]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAT9mim47711 for ; Thu, 29 Nov 2001 04:48:44 -0500 (EST) (envelope-from brent@mutt.rcfile.org) Received: from mutt.rcfile.org (rdu57-26-120.nc.rr.com [66.57.26.120]) by habanero.hesketh.net (8.11.6/8.11.1) with ESMTP id fAT9mdU31182; Thu, 29 Nov 2001 04:48:39 -0500 X-Received-From: brent@mutt.rcfile.org X-Delivered-To: pgsql-sql@postgresql.org X-Spam-Filter: check_local@habanero.hesketh.net by digitalanswers.org X-More-Information: http://spamfighter.hesketh.net Received: (from brent@localhost) by mutt.rcfile.org (8.11.6/8.11.5) id fAT9mdd12280; Thu, 29 Nov 2001 04:48:39 -0500 (EST) (envelope-from brent) Date: Thu, 29 Nov 2001 04:48:39 -0500 From: Brent Verner To: Markus Bertheau Cc: postgres sql list Subject: Re: date_part vs extract Message-ID: <20011129094839.GB11369@rcfile.org> References: <1007023539.4636.66.camel@entwicklung01.cenes.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1007023539.4636.66.camel@entwicklung01.cenes.de> User-Agent: Mutt/1.3.23.2i X-Archive-Number: 200111/402 X-Sequence-Number: 5784 On 29 Nov 2001 at 09:45 (+0100), Markus Bertheau wrote: | 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? The EXTRACT syntax ends up as a call to the internal date_part(...) function. If SQL-portability is not a concern, calling date_part() directly should be a bit quicker. cheers. brent -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman