Received: from mailsys01.intnet.net (mailhost.wwc.com [198.252.32.15]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f49NtZA79238 for ; Wed, 9 May 2001 19:55:35 -0400 (EDT) (envelope-from jconway2@home.com) Received: from [206.19.64.3] (HELO jecw2k1) by mailsys01.intnet.net (CommuniGate Pro SMTP 3.3.2) with SMTP id 7907525; Wed, 09 May 2001 19:54:42 -0400 Message-ID: <00c901c0d8e3$87b7f650$54d410ac@jecw2k1> From: "Joe Conway" To: "Joseph Shraibman" , References: <3AF9AECE.DE93E098@selectacast.net> <000c01c0d8d2$cefddf90$54d410ac@jecw2k1> <3AF9D542.88C9FACD@selectacast.net> <3AF9D643.56296A4A@selectacast.net> Subject: Re: 'record old is unassigned yet' when using trigger in 7.1.1 Date: Wed, 9 May 2001 16:55:29 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200105/71 X-Sequence-Number: 2872 > 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 > ? 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