Re: Struggling with set-returning functions, seeking advice

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Struggling with set-returning functions, seeking advice
Дата
Msg-id 3F1EB072.7050903@joeconway.com
обсуждение исходный текст
Ответ на Struggling with set-returning functions, seeking advice  (Jason Topaz <topaz@panix.com>)
Список pgsql-novice
Jason Topaz wrote:
> 3) Any recommendations for a completely different way to approach this
>    table transformation?  Incidentally, I have simplified a lot for
>    purposes of this posting, but the real application involves
> transforming
>    time-series data (stored in an array field) into a expanded table
>    where there is one row per original element in the array.
>

In addition to Tom's comments I'd add that for your real application, if
you are familiar with S-PLUS or R, you might find that it is easier to
do what you want using PL/R. The S language is a good fit if you have
arrays you need to manipulate.

I typically solve this kind of problem by passing any WHERE clause
criteria as arguments, build and execute the SQL statement, manipulate
that data, and then return just the final results via a FROM clause PL/R
function.

You can get PL/R here:
   http://www.joeconway.com/plr/

HTH,

Joe


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Struggling with set-returning functions, seeking advice
Следующее
От: "Patrick Hatcher"
Дата:
Сообщение: Re: Need clarifications......