Re: Update 3 columns w/ 1 function calc 3 values?

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Update 3 columns w/ 1 function calc 3 values?
Дата
Msg-id 4523E319.6020502@logix-tt.com
обсуждение исходный текст
Ответ на Update 3 columns w/ 1 function calc 3 values?  (paallen@attglobal.net)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "christopher wood"
Дата:
Сообщение: Re: Assigning a timestamp without timezone to a timestamp
Следующее
От: Daryl Richter
Дата:
Сообщение: Re: i have table