C trigger problem

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: C trigger problem
Date: 2005-09-17 13:41:45
Message-ID: 20050917134145.GB25465@quartz.itdept.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I am trying to write a C trigger. Essentially

TriggerData *in = (TriggerData *) fcinfo->context;
HeapTupleHeader tuple=in->tg_trigtuple->t_data;
Datum datum;
datum = GetAttributeByName(tuple, "unit_id", &isnull);

and that last line fails with

ERROR: cache lookup failed for type 4664

I haven't seen anything similar in the documentation.. What is wrong / the
correct way of extracting values from the old/new rows in a C trigger fn?

Cheers,

Patrick

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-17 14:08:40 Re: C trigger problem
Previous Message Magnus Hagander 2005-09-17 12:48:05 Re: [pgsql-hackers-win32] Time to close hackers-win32?