Re: difficulty extracting variable-sized field on triggered row - Mailing list pgsql-general

From Tom Lane
Subject Re: difficulty extracting variable-sized field on triggered row
Date
Msg-id 28769.1196783617@sss.pgh.pa.us
Whole thread Raw
In response to Re: difficulty extracting variable-sized field on triggered row  ("Glen W. Mabey" <Glen.Mabey@swri.org>)
Responses Re: difficulty extracting variable-sized field on triggered row
List pgsql-general
"Glen W. Mabey" <Glen.Mabey@swri.org> writes:
> Is there somewhere that I am not adequately checking for an error?

1. You're passing SPI_getbinval an uninitialized bool pointer.

2. You're discarding its result, which you need.

3. You're not checking for a null, and the error check you do have
   is wrong/redundant.

4. Use DatumGetTextP(), not DatumGetPointer nor PG_DETOAST_DATUM.

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: difficulty extracting variable-sized field on triggered row
Next
From: Martijn van Oosterhout
Date:
Subject: Re: difficulty extracting variable-sized field on triggered row