Re: Writing SRF

Поиск
Список
Период
Сортировка
От Jorge Arevalo
Тема Re: Writing SRF
Дата
Msg-id u2td321138e1004300124n5eaa3bcax81d9e023de20fd21@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Writing SRF  (Martin Gainty <mgainty@hotmail.com>)
Список pgsql-general
On Thu, Apr 29, 2010 at 8:08 PM, Martin Gainty <mgainty@hotmail.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@gis4free.org
>> Date: Thu, 29 Apr 2010 19:45:41 +0200
>> Subject: Re: [GENERAL] Writing SRF
>> To: tgl@sss.pgh.pa.us
>> CC: pgsql-general@postgresql.org
>>
>> On Thu, Apr 29, 2010 at 3:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> > Jorge Arevalo <jorgearevalo@gis4free.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@postgresql.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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Jorge Arevalo
Дата:
Сообщение: Re: Writing SRF
Следующее
От: Kenichiro Tanaka
Дата:
Сообщение: Re: Select with string that has a lone hyphen yields nothing