Steve Lane <slane@fmpro.com> writes:
> NOTICE: Error occurred while executing PL/pgSQL function
> lookup_name_district
> NOTICE: line 1 at select into variables
> ERROR: record student_rec is unassigned yet
Hm. Could we see a complete example (eg, a runnable psql script to set
up the tables and the function and cause the error)? Trying to fill in
the missing pieces is no fun.
> 2. I thought I had understood the SQL standard to say that using AS when
> making column aliases was always optional,
The spec says that, but AS is always required for a column alias in PG.
See the "Compatibility" discussion on the SELECT reference page.
regards, tom lane