Re: syntax error in a trigger. can't find it.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rhys A(dot)D(dot) Stewart" <rhys(dot)stewart(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: syntax error in a trigger. can't find it.
Date: 2013-01-12 22:32:32
Message-ID: 24806.1358029952@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Rhys A.D. Stewart" <rhys(dot)stewart(at)gmail(dot)com> writes:
> I must be very tired, very hungry or both. I'm getting a syntax error in
> the last line with the 'END;' But am clearly not seeing what the error is.
> Any help would be appreciated.

I think you need to change ELSE IF to ELSEIF. As written you need two
END IF lines to match the two independent IFs.

I wonder whether we could get plpgsql's parser to be more helpful about
END-matching errors ... they're certainly easy ones to make.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-01-13 00:07:48 Re: pgadmin connection via tunnel and ubuntu user instead of postgres
Previous Message Rhys A.D. Stewart 2013-01-12 22:28:32 Re: syntax error in a trigger. can't find it.