Re: Extending SQL in C using VARIABLE length type - Mailing list pgsql-general

From Carsten Kropf
Subject Re: Extending SQL in C using VARIABLE length type
Date
Msg-id C04CD528-351E-488B-8207-115EBF445FDB@fh-hof.de
Whole thread Raw
In response to Re: Extending SQL in C using VARIABLE length type  (Yeb Havinga <yebhavinga@gmail.com>)
List pgsql-general
Thanks for the hint according to the cube, this was actually exactly what I have been looking for. I wanted to do
somethingsimilar like the cube but I didn't think that it would be implemented in multiple dimension. I just thought,
thecube were a 3-d construct, but as I see in the sources, it is, in fact, n-dimensional. So my problems are solved
here.Btw I could manage to get my own point to be saved in the database using your hints, thanks for this. 

regards
    Carsten Kropf
Am 10.02.2010 um 12:20 schrieb Yeb Havinga:

> Carsten Kropf wrote:
>> Oh, I see, does the VARSIZE length field have to be the total number of bytes occupied (including VARHDRSZ and the
sizeof the structure) or only the size that is used by "my" datatype? 
> Yes
>> Then it would become pretty much obvious, why this is not supposed to work.
>> I'll try it out then.
>>
> My €0,02: rename the dimensions to vl_len_ to avoid confusion and get compiler errors where you now use 'dimension'.
Adda macro that converts a pointnd structure to dimension int by taking the VARSIZE_ANY_EXHDR / sizeof(float8) and use
itwhere dimension is used now. Or if your database is small you could keep dimension in the structure. 
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: PHP and PostgreSQL boolean data type
Next
From: Tommy Gildseth
Date:
Subject: Re: PHP and PostgreSQL boolean data type