Danny Lo <lo(dot)dannyk(at)gmail(dot)com> writes:
>> Following error. Just want to know correct way to use label. Thanks very
>> much.
You need to put the <<label>> before the DECLARE, not after --- see the
syntax examples here:
http://www.postgresql.org/docs/8.4/static/plpgsql-structure.html
I think it's a bug that it's not throwing an error for the label
placement as you have it.
regards, tom lane