Constructing array

Поиск
Список
Период
Сортировка
Искать

Constructing array

От:
Magnus Hagander <magnus@hagander.net>
Дата:
Hi!

Does anybody have a good pointer for an example of how to construct an 
array in a SRF? Or if not such a pointer, hints on which way is best to 
do it? (it'll be an array of text strings, one-dimensional)

(This is from C, if that's not obvious)

//Magnus

Re: Constructing array

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Magnus Hagander  writes:
> Does anybody have a good pointer for an example of how to construct an 
> array in a SRF? Or if not such a pointer, hints on which way is best to 
> do it? (it'll be an array of text strings, one-dimensional)

If you can build it in one swoop, use construct_array().  If you need
to build it incrementally then things will be much more painful...
		regards, tom lane

Re: Constructing array

От:
Joe Conway <mail@joeconway.com>
Дата:
Magnus Hagander wrote:
> Hi!
> 
> Does anybody have a good pointer for an example of how to construct an 
> array in a SRF? Or if not such a pointer, hints on which way is best to 
> do it? (it'll be an array of text strings, one-dimensional)
> 
> (This is from C, if that's not obvious)

I'm sure there are other good examples, but one possibility is to look 
at pg_conversion.c in PL/R source. Start with get_array_datum().

HTH,

Joe

FAQ