shortcircuit logic in plpsql

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема shortcircuit logic in plpsql
Дата
Msg-id e9k7va$lrg$1@news.hub.org
обсуждение исходный текст
Ответы Re: shortcircuit logic in plpsql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I'm trying to do this:

  IF TG_OP = \'INSERT\' OR (TG_OP = \'UPDATE\' AND OLD.status <>
NEW.status) THEN

..but pg is complaining:

ERROR:  record "old" is not assigned yet
DETAIL:  The tuple structure of a not-yet-assigned record is indeterminate.
CONTEXT:  PL/pgSQL function "set_dir_count" line 4 at if

Does plpgsql not short circuit its logic?

=>select version();
                                                  version
---------------------------------------------------------------------------------------------------------
  PostgreSQL 8.0.8 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2
20030222 (Red Hat Linux 3.2.2-5)
(1 row)

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

Предыдущее
От: Q
Дата:
Сообщение: Re: Antw: Performance problem with query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: shortcircuit logic in plpsql