BUG #2447: backend crashes when plpgsql functions are used in rules

Поиск
Список
Период
Сортировка
От michael crozier
Тема BUG #2447: backend crashes when plpgsql functions are used in rules
Дата
Msg-id 200605200132.k4K1We6p051581@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2447: backend crashes when plpgsql functions are used in rules  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2447
Logged by:          michael crozier
Email address:      crozierm@conducivetech.com
PostgreSQL version: 8.0.7 & 8.0.3
Operating system:   solaris 10 and linux
Description:        backend crashes when plpgsql functions are used in rules
Details:

Using a function invocation in the WHERE expression of a RULE causes the
backend to crash.

I could not reproduce the problem on 8.1-beta4/Linux, but could reproduce it
on 8.0.5/Solaris, 8.0.7/Solaris, and 8.0.3/Linux.

Here is an example that can cause the crash:


CREATE TABLE parent ( id integer primary key);

CREATE OR REPLACE FUNCTION rule_condition(parent_row parent )
RETURNS INTEGER AS
$$
BEGIN
  RETURN 0;
END;
$$ LANGUAGE 'plpgsql';

CREATE OR REPLACE RULE parent_rule AS
  ON INSERT TO parent
  WHERE 0=rule_condition(NEW)
  DO INSTEAD ();

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Stephen"
Дата:
Сообщение: BUG #2446: FATAL: Could not write to statistics collector pipe.
Следующее
От: ""
Дата:
Сообщение: BUG #2445: incompatibility: realloc <> repalloc