Re: 'record old is unassigned yet' when using trigger in 7.1.1 - Mailing list pgsql-sql

From Joe Conway
Subject Re: 'record old is unassigned yet' when using trigger in 7.1.1
Date
Msg-id 00c901c0d8e3$87b7f650$54d410ac@jecw2k1
Whole thread Raw
In response to 'record old is unassigned yet' when using trigger in 7.1.1  (Joseph Shraibman <jks@selectacast.net>)
List 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 by date:

Previous
From: "Joe Conway"
Date:
Subject: Re: 'record old is unassigned yet' when using trigger in 7.1.1
Next
From: Joseph Shraibman
Date:
Subject: Re: 'record old is unassigned yet' when using trigger in 7.1.1