From: | Michael Goldberg <mic(dot)goldberg(at)gmail(dot)com> |
---|---|
To: | Fabiana Zioti <fabi_zioti(at)hotmail(dot)com>, pgsql-iw-general(at)postgresql(dot)org |
Subject: | Re: Extending SQL in C using VARIABLE length type in user defined type |
Date: | 2017-06-08 07:52:43 |
Message-ID: | CADJmpXH6DRZ810f11OE14R_dhoMdjU7tV5nQJOKR7JFioC3c4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-iw-general |
Hi Fabiana,
We will try to help you:)
This email was sent to me only and I'm adding the rest of the list members.
Thanks,
Michael
On Wed, Jun 7, 2017 at 5:59 PM, Fabiana Zioti <fabi_zioti(at)hotmail(dot)com>
wrote:
> I am trying around a little bit with creating my own types using shared
> objects, written in C. The usage of static types with fixed length was
> actually no problem for me, so I proceeded to variable length types. I
> created an n-dimensional point structure called "Geo_Polygon" that contains
> a field of Geo_Point values of dynamic length. Like:
>
>
> typedef struct Geo_Point{
> double x;
> double y;
> int id;
> } Geo_Point;
>
> typedef struct Geo_Polygon{
> int32 v_len;
> Geo_Point pontos[FLEXIBLE_ARRAY_MEMBER];
> } Geo_Polygon;
>
> The Geo_Point works fine.
>
> I don`t know to convert the structure of Geo_polygon to the
> internal/external representation properly.
>
> PG_FUNCTION_INFO_V1(geo_polygon_in);
> PG_FUNCTION_INFO_V1(geo_polygon_out);
>
> I would be very glad, if somebody could provide me some help to this.
> Thank you in advance
>
> Best regards
>
> Fabiana
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Goldberg | 2017-07-18 07:43:13 | Last community updates |
Previous Message | Michael Goldberg | 2017-05-02 11:07:05 | Last community updates |