Re: TCL trigger doesn't work after deleting a column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Josu? Maldonado <josue(at)lamundial(dot)hn>, pgsql-general(at)postgresql(dot)org
Subject: Re: TCL trigger doesn't work after deleting a column
Date: 2003-09-04 15:21:05
Message-ID: 28188.1062688865@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> It would help if you send the complete example, including the part
> where you actually drop a column from the table.

Oh, I forgot about that part (should read the Subject: line again ;-)).

I do see a failure after dropping a column. I've applied this patch.

regards, tom lane

*** src/pl/tcl/pltcl.c.orig Fri Aug 8 17:47:53 2003
--- src/pl/tcl/pltcl.c Thu Sep 4 11:06:53 2003
***************
*** 2312,2317 ****
--- 2312,2321 ----

for (i = 0; i < tupdesc->natts; i++)
{
+ /* ignore dropped attributes */
+ if (tupdesc->attrs[i]->attisdropped)
+ continue;
+
/************************************************************
* Get the attribute name
************************************************************/
***************
*** 2382,2387 ****
--- 2386,2395 ----

for (i = 0; i < tupdesc->natts; i++)
{
+ /* ignore dropped attributes */
+ if (tupdesc->attrs[i]->attisdropped)
+ continue;
+
/************************************************************
* Get the attribute name
************************************************************/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Harald Fuchs 2003-09-04 15:22:41 Re: Replaceing records
Previous Message Alvaro Herrera Munoz 2003-09-04 15:05:30 Re: TCL trigger doesn't work after deleting a column