Re: 'record old is unassigned yet' when using trigger in 7.1.1

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: 'record old is unassigned yet' when using trigger in 7.1.1
Дата
Msg-id 00c901c0d8e3$87b7f650$54d410ac@jecw2k1
обсуждение исходный текст
Ответ на 'record old is unassigned yet' when using trigger in 7.1.1  (Joseph Shraibman <jks@selectacast.net>)
Список pgsql-sql
> 2)  Why when I use psql does it look like this:
> playpen=# create function utbl_set_statchangedate() returns opaque as
> playpen-# 'begin
> playpen'#      IF TG_OP = \'INSERT\'
> playpen'#      THEN
> playpen'#      NEW.statchangedate := CURRENT_DATE;
> playpen'#      ELSE IF OLD.status <> NEW.status
> playpen'#      THEN
> playpen'#
> ABORT     BEGIN     CLUSTER   COMMIT    CREATE    DELETE    EXPLAIN
<snip>
> ?  What's with the \nABORT .. UPDATE ?

I've seen this before also. I think psql gets confused and prints out some
sort of keyword list. Try saving your function to a file, and then use \i,
e.g.

playpen'#  \i /path/to/your/script/scriptname.sql

-- Joe



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

Предыдущее
От: "Joe Conway"
Дата:
Сообщение: Re: 'record old is unassigned yet' when using trigger in 7.1.1
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: 'record old is unassigned yet' when using trigger in 7.1.1