pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabi@logix-tt.com>
To: paallen@attglobal.net
Cc: pgsql-sql@postgresql.org
Subject: Re: Update 3 columns w/ 1 function calc 3 values?
Date: Wed, 04 Oct 2006 18:36:41 +0200
Message-ID: <4523E319.6020502@logix-tt.com> (raw)
In-Reply-To: <20061003145559.C55369FB26B@postgresql.org>
References: <20061003145559.C55369FB26B@postgresql.org>

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



view thread (4+ messages)

Message-ID: <4523E319.6020502@logix-tt.com>
Permalink:  ../4523E319.6020502@logix-tt.com/
Also on:    postgresql.org/message-id/4523E319.6020502@logix-tt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: schabi@logix-tt.com, paallen@attglobal.net
  Subject: Re: Update 3 columns w/ 1 function calc 3 values?
  In-Reply-To: <4523E319.6020502@logix-tt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox