Re: C Function with Arrays Question - Mailing list pgsql-general

From Tom Lane
Subject Re: C Function with Arrays Question
Date
Msg-id 25821.1017156786@sss.pgh.pa.us
Whole thread Raw
In response to C Function with Arrays Question  (Achilleus Mantzios <rnd@gatewaynet.com>)
List pgsql-general
Achilleus Mantzios <rnd@gatewaynet.com> writes:
> Is there a way of accessing _float8 (float8[]) values inside of
> a server-side C function??

There are some examples in the "FLOAT AGGREGATE OPERATORS" section of
src/backend/utils/adt/float.c.  construct_array() and
deconstruct_array() are the most general answers, but for fixed-width
element types like float8 you can cheat quite a lot.

>     /* what happened to palloc in pgsql 7.2??,

Nothing.

>     * Also what happened to postgres.h??

Also nothing.  Did you do "make install-all-headers"?

            regards, tom lane

pgsql-general by date:

Previous
From: "PGMailList"
Date:
Subject: Re: INSERTs slow
Next
From: "Tim Barnard"
Date:
Subject: Re: libpqxx has HTML docs