tg_relation doesn't seem to have the attribute names! - Mailing list pgsql-general

From Graeme Hinchliffe
Subject tg_relation doesn't seem to have the attribute names!
Date
Msg-id 1094470500.22603.79.camel@office-137.zen.co.uk
Whole thread Raw
Responses Re: tg_relation doesn't seem to have the attribute names!
List pgsql-general
Hiya,

    I am using the following line to retrieve the attribute name of the 1st
column for a table on which a trigger has been fired.

idfield=SPI_fname(trigdata->tg_relation->rd_att,0);

The trigger that calls this function runs after for insert, update and
delete.

Insert works fine with no issues, Delete however doesn't, and I have
tracked down that the above line is returning a NULL.  This code did
work for 7.3.x but isn't for 7.4.3

Is there something I have overlooked, I have read the docs and
apparently trigdata->tg_relation->rd_att should contain the relation of
the table.

please help.

thanks

--
-----
Graeme Hinchliffe (BSc)
Core Internet Systems Designer
Zen Internet (http://www.zen.co.uk/)

Direct: 0845 058 9074
Main  : 0845 058 9000
Fax   : 0845 058 9005



pgsql-general by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: DROP TRIGGER permission
Next
From: Christopher Browne
Date:
Subject: Re: One Database per Data File?