> 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