The following bug has been logged online:
Bug reference: 5757
Logged by: Andrey Galkin
Email address: andvgal(at)gmail(dot)com
PostgreSQL version: 9.0.1
Operating system: Debian unstable
Description: PL/PGSQL composite variable field error reporting
Details:
1. Create a variable of composite type in PL/PGSQL function
2. Try to reference not existing field of the variable in some statement,
like IF
3. Get "missing FROM-clause entry for table" error at runtime
The error is not very helpful. If it's possible please detect the
incorrectly referenced field at parsing/statement preparing time.