Re: Sequences, triggers and 'OLD' - am I being stupid?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steve South" <steve(dot)south(at)blueyonder(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Sequences, triggers and 'OLD' - am I being stupid?
Date: 2005-10-07 14:18:30
Message-ID: 3637.1128694710@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Steve South" <steve(dot)south(at)blueyonder(dot)co(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Steve South 2005-10-07 14:33:16 Re: Sequences, triggers and 'OLD' - am I being stupid?
Previous Message Steve South 2005-10-07 13:47:39 Re: Sequences, triggers and 'OLD' - am I being stupid?