Search Postgresql Archives

Re: Writing SRF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 29, 2010 at 8:08 PM, Martin Gainty <mgainty@xxxxxxxxxxx> 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@xxxxxxxxxxxx
>> Date: Thu, 29 Apr 2010 19:45:41 +0200
>> Subject: Re:  Writing SRF
>> To: tgl@xxxxxxxxxxxxx
>> CC: pgsql-general@xxxxxxxxxxxxxx
>>
>> On Thu, Apr 29, 2010 at 3:56 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>> > Jorge Arevalo <jorgearevalo@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
>> 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.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux