From: | Jorge Arevalo <jorgearevalo(at)gis4free(dot)org> |
---|---|
To: | Martin Gainty <mgainty(at)hotmail(dot)com> |
Cc: | Tom State of Pa <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Writing SRF |
Date: | 2010-04-30 08:24:50 |
Message-ID: | u2td321138e1004300124n5eaa3bcax81d9e023de20fd21@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Apr 29, 2010 at 8:08 PM, Martin Gainty <mgainty(at)hotmail(dot)com> wrote:
> it has been years since i've mucked in the C++ swamp but
> that means your (near) heap is ok but you're stack is hosed..
>
> probably specific to compiler (version) and Operating System(version) and
> environment settings..ping back if you are still experiencing those problems
> with those configuration settings
>
Ok, now it's working. In GNU/Linux with gcc 4.4.1, and I hope in
Windows XP too (it will be tested). Many thanks!
> Saludos Cordiales desde EEUU!
> Martin Gainty
¡Saludos desde España también!
Jorge
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>> From: jorgearevalo(at)gis4free(dot)org
>> Date: Thu, 29 Apr 2010 19:45:41 +0200
>> Subject: Re: [GENERAL] Writing SRF
>> To: tgl(at)sss(dot)pgh(dot)pa(dot)us
>> CC: pgsql-general(at)postgresql(dot)org
>>
>> On Thu, Apr 29, 2010 at 3:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> > Jorge Arevalo <jorgearevalo(at)gis4free(dot)org> writes:
>> >> Yes. For example, the function expects 2 arguments, and it's called
>> >> with 2 arguments: 1 composite type (following this format
>> >>
>> >> https://svn.osgeo.org/postgis/spike/wktraster/doc/RFC1-SerializedFormat)
>> >> and one integer. But PG_NARGS() returns a really big value (16297)
>> >> when I first check the number of arguments at the beginning of the
>> >> function. Has sense?
>> >
>> > Given only that data point, I would guess that you forgot to mark the
>> > function as being called with V1 protocol (PG_FUNCTION_INFO_V1).
>> >
>> > regards, tom lane
>> >
>>
>> Many thanks! That was one of my errors. Another one was this:
>>
>> char szDataPointer[10];
>> sprintf(szDataPointer, "%p", a_pointer);
>>
>> These lines caused a memory error. I changed them for:
>>
>> char * pszDataPointer;
>> pszDataPointer = (char *)allocator(10 * sizeof(char));
>> sprintf(pszDataPointer, "%p", a_pointer);
>>
>> Meaning "allocator" a memory allocator in a valid memory context for
>> PostgreSQL.
>>
>> And seems to work :-). Is the static memory "dangerous" in a
>> PostgreSQL memory context?
>>
>> Thanks again!
>> Jorge
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>
> ________________________________
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
> Hotmail. Get busy.
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Christensen | 2010-04-30 08:55:52 | Indexing queries with bit masks |
Previous Message | Jorge Arevalo | 2010-04-30 08:22:16 | Re: Writing SRF |