Re: Better support for whole-row operations and composite types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Better support for whole-row operations and composite types
Date: 2004-04-04 04:05:36
Message-ID: 20442.1081051536@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Conway <mail(at)joeconway(dot)com> writes:
> For triggers, I was previously building up the arguments thus:
> slot = TupleDescGetSlot(tupdesc);
> slot->val = trigdata->tg_trigtuple;
> arg[7] = PointerGetDatum(slot);

> I suppose now I should do this instead?
> arg[7] = PointerGetDatum(trigdata->tg_trigtuple->t_data);

Hm, no, that won't work because a tuple being passed to a trigger
probably isn't going to contain valid type information. The API for
calling triggers is different from calling ordinary functions, so
I never thought about trying to make it look the same. At what point
are you trying to do the above, anyway?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2004-04-04 04:25:28 Re: Better support for whole-row operations and composite
Previous Message Neil Conway 2004-04-04 03:22:06 Re: Function to kill backend