Received: from fslc.ser.usu.edu (fslc.ser.usu.edu [129.123.28.122]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3CIto858444 for ; Thu, 12 Apr 2001 14:55:50 -0400 (EDT) (envelope-from rmello@fslc.usu.edu) Received: (from rmello@localhost) by fslc.ser.usu.edu (8.12.0.Beta5/8.12.0.Beta5/Debian 8.12.0-1) id f3CItkUq027784; Thu, 12 Apr 2001 12:55:46 -0600 Date: Thu, 12 Apr 2001 12:55:46 -0600 From: Roberto Mello To: Josh Berkus Cc: pgsql-sql@postgresql.org Subject: Re: Function overlaps_interval Message-ID: <20010412125546.A27735@cc.usu.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: ; from josh@agliodbs.com on Thu, Apr 12, 2001 at 11:23:28AM -0700 X-Archive-Number: 200104/184 X-Sequence-Number: 2532 On Thu, Apr 12, 2001 at 11:23:28AM -0700, Josh Berkus wrote: > Folks, > > I wrote this PL/pgSQL function for my current project, and thought it > would be generally useful. An expansion of the builtin > overlaps(dt1,dt2,dt3,dt4) function, this function returns the interval > of time for which the two datetime ranges overlap. > > Roberto, please include this in your online PL/pgSQL function library. Done! Thanks Josh! Date/Time manipulation functions are now our most popular category. How about you? Do you have a (SQL|PL/pgSQL|PL/Perl|PL/Tcl|PL/Python) function that you are proud of? A function that makes your life easier? Then waste no more time! Point your browser to http://www.brasileiro.net/postgres submit your recipe and join the CookBook Hall of Fame! You get your own awesome-cool "PostgreSQL Powered" button! We've been getting many hits from techdocs.postgresql.org, which shows that many are going to techdocs looking for solutions to common problems. Very useful. -Roberto -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net http://www.sdl.usu.edu - Space Dynamics Lab, Developer Bad command or file name. Go sit in corner.