Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 79F799FB1EE for ; Wed, 4 Oct 2006 13:36:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 00460-09-2 for ; Wed, 4 Oct 2006 13:36:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id A5B909FB24D for ; Wed, 4 Oct 2006 13:36:43 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (p549D1602.dip0.t-ipconnect.de [84.157.22.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id E6AD865997; Wed, 4 Oct 2006 18:39:08 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 2A0B218818CDE; Wed, 4 Oct 2006 18:36:42 +0200 (CEST) Message-ID: <4523E319.6020502@logix-tt.com> Date: Wed, 04 Oct 2006 18:36:41 +0200 From: Markus Schaber Reply-To: pgsql-sql@postgresql.org Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: paallen@attglobal.net Cc: pgsql-sql@postgresql.org Subject: Re: Update 3 columns w/ 1 function calc 3 values? References: <20061003145559.C55369FB26B@postgresql.org> In-Reply-To: <20061003145559.C55369FB26B@postgresql.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.203 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/45 X-Sequence-Number: 26434 Hi, paallen, paallen@attglobal.net wrote: > I am moving some of my old MS Access functions to > plpgsql. > > My function was made to return coordinates, X,Y,Z > for a point along a curved line. Depending on the actual kind of data, you might want to look into the PostgeSQL geometry types, or PostGIS for your geometric data. > What should I do to speed this up. What is the > best way to update 3 columns from one function > call. In MSACCESS I once rig the function to > cycle through the records with a curser but that > was slow and would crap out due to the shear number. It might work to mark the function as "stable", and have it return a compound type in a subselect with an "AS foo" aliasname. Then you should be able to address the compound's elements via foo.x, foo.y and foo.z. Or use PostGIS, it's capable of processing 3D points. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org