Re: TCL trigger doesn't work after deleting a column - Mailing list pgsql-general

From Tom Lane
Subject Re: TCL trigger doesn't work after deleting a column
Date
Msg-id 28188.1062688865@sss.pgh.pa.us
Whole thread Raw
In response to Re: TCL trigger doesn't work after deleting a column  (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>)
List pgsql-general
Alvaro Herrera Munoz <alvherre@dcc.uchile.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
           ************************************************************/

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: adding SERIAL to a table
Next
From: Harald Fuchs
Date:
Subject: Re: Replaceing records