Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id BB41147760B for ; Fri, 21 Jun 2002 17:17:45 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 896E5477607 for ; Fri, 21 Jun 2002 15:37:28 -0400 (EDT) Received: from [216.135.165.74] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1552113; Fri, 21 Jun 2002 12:37:27 -0700 From: "Josh Berkus" Subject: Re: skip weekends To: Rudi Starcevic , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Fri, 21 Jun 2002 12:37:27 -0700 Message-ID: In-Reply-To: <3D12C2C0.2040904@oasis.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200206/304 X-Sequence-Number: 8269 Rudi, > Nice reply Josh. > I wouldn't call your solution 'ugly' at all. Actually I posed te question, and Joe Conway offered the solution. I'll be testing and reporting back. > It's an excellent example of a real world need for Postgresql > functions. > I've also been looking at other functions at > http://www.brasileiro.net/postgres/cookbook/. > I noticed your name amongst the author's -- nice one -- keep up the > good work. Yes. Sadly, Roberto seems to have lost interest in PostgreSQL, so the cookbook is frozen. For example, There's a couple of bugs in name_alike I'd like to fix, but I can't correct them and Roberto doesn't answer his e-mail. Anybody wanna take over the Cookbook? > My only problem is trying to decide on whether to use PL/pgSQL or > PLPerl. Use them both. PL/Perl is better at text parsing, loops and arrays. PL/pgSQL is faster for data operations. Use the best tool for the job! One thing I'd love to see is a generic address tokenizer, so that I can write an "address_alike" function. My Perl isn't up to it. Heck, a generic string tokenizer would be even more useful. Can a PL/Perl function return an array? -Josh