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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TCL trigger doesn't work after deleting a column
Дата
Msg-id 28188.1062688865@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TCL trigger doesn't work after deleting a column  (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>)
Список 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 по дате отправления:

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: adding SERIAL to a table
Следующее
От: Harald Fuchs
Дата:
Сообщение: Re: Replaceing records