Re[2]: SPI_getvalue problem
| От | Alex Guryanow |
|---|---|
| Тема | Re[2]: SPI_getvalue problem |
| Дата | |
| Msg-id | 5387.010129@nlr.ru обсуждение исходный текст |
| Ответ на | Re: SPI_getvalue problem (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Re[2]: SPI_getvalue problem
|
| Список | pgsql-general |
Sunday, January 28, 2001, 8:24:51 PM Tom wrote:
TL> Alex Guryanow <gav@nlr.ru> writes:
>> I have the following problem: the backend crashes on Solaris while
>> executing the function SPI_getvalue.
>> At the same time on Linux this trigger works fine.
>> Is this a bug or my misconfuguration?
TL> Sounds like a bug to me, but you haven't demonstrated that the bug is in
TL> SPI_getvalue and not in your own code. The first thing I'd wonder about
TL> is if your trigger function is checking for NULL value before calling
TL> SPI_getvalue (or at least before trying to do anything useful with the
TL> result).
You have right. One of the values passed to SPI_getvalue is NULL. This is second parameter
(tupdesc). But why on Linux it is not NULL, and on Solaris is?
Here is part of my trigger-code:
rel = CurrentTriggerData->tg_relation;
trigtuple = CurrentTriggerData->tg_trigtuple;
newtuple = CurrentTriggerData->tg_newtuple;
tupdesc = rel->rd_att;
elog(DEBUG, "before 1 SPI");
elog(DEBUG, "triggered for relation %s", SPI_getrelname(CurrentTriggerData->tg_relation) );
id = atoi( SPI_getvalue( trigtuple, tupdesc, 1 ) );
elog( DEBUG, "before 1.5 SPI" ); // !!! this isn't called in Solaris
Best regards,
Alex
В списке pgsql-general по дате отправления: