tg_relation doesn't seem to have the attribute names!

From: Graeme Hinchliffe <graeme(dot)hinchliffe(at)zeninternet(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: tg_relation doesn't seem to have the attribute names!
Date: 2004-09-06 11:35:01
Message-ID: 1094470500.22603.79.camel@office-137.zen.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Björn Voigt 2004-09-06 11:57:11 Clustering postgresql
Previous Message Oliver Elphick 2004-09-06 11:04:00 Re: DROP TRIGGER permission