Re: difficulty extracting variable-sized field on triggered row

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Glen W(dot) Mabey" <Glen(dot)Mabey(at)swri(dot)org>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: difficulty extracting variable-sized field on triggered row
Date: 2007-12-04 15:51:23
Message-ID: 20071204155123.GC4727@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Glen W. Mabey escribió:

> TriggerData *trigdata;
> Datum relative_filename_datum;
> text *relative_filename_t;
> int file_name_colnumber, ret;
> bool *isnull;

This is wrong. Try

bool isnull;

and later:

SPI_getbinval( trigdata->tg_trigtuple, trigdata->tg_relation->rd_att, file_name_colnumber, &isnull );

--
Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC
"No hay ausente sin culpa ni presente sin disculpa" (Prov. francés)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-12-04 15:53:37 Re: difficulty extracting variable-sized field on triggered row
Previous Message Martijn van Oosterhout 2007-12-04 15:43:51 Re: difficulty extracting variable-sized field on triggered row