Re: Sequences, triggers and 'OLD' - am I being stupid? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Sequences, triggers and 'OLD' - am I being stupid?
Date
Msg-id 3637.1128694710@sss.pgh.pa.us
Whole thread Raw
In response to Re: Sequences, triggers and 'OLD' - am I being stupid?  ("Steve South" <steve.south@blueyonder.co.uk>)
List pgsql-novice
"Steve South" <steve.south@blueyonder.co.uk> writes:
> ERROR:  record "old" has no field "userid"

I think you're just being sloppy about capitalization:

>     OLD."UserId",

>   "UserID" int4 NOT NULL DEFAULT nextval('public."UserT_UserID_seq"'::text),

"UserID" != "UserId".

Also, the error message suggests strongly that you didn't double-quote
the name in at least one place in the trigger, so that it got folded
to lower case.

            regards, tom lane

pgsql-novice by date:

Previous
From: "Lee, Patricia S."
Date:
Subject: Adding a template for new platform
Next
From: "Jon Burroughs"
Date:
Subject: Intersection of two time segments