"Keith Worthington" <keithw(at)narrowpathinc(dot)com> writes:
> Thanks Michael. I understand why PL/pgSQL is confused. I was trying to set
> the value of that variable for later use not assign a column alias. How do I
> store the value returned by the query?
SELECT ... INTO, not SELECT ... AS
regards, tom lane