The following bug has been logged online: Bug reference: 5108 Logged by: Balazs Klein Email address: balazs.kl...@gmail.com PostgreSQL version: 8.4.1 Operating system: Windows XP Description: plpgsql function name conflict with table alias Details:
I have a plpgsql function called irq(IN ulist integer[], .....) defined as Select .......... irq.instreq_min_metcount, irq.ref_deptype, irq.instreq_aggrfunc >From .................. instrument_requirement irq ON ........ It works fine on 8.1 Linux On 8.4.1 on windows XP running the function gives an error message (Undefined column: 7 ERROR: record "rec" has no field "instreq_id") wich is strange because the underlying query does return that column. I run the create script of irq to create irq2 - and irq2 works fine. I delete irq and rename irq2 to irq and I get the error back. The error is consistent in the sense that if I delete the database and restore it it appears again the same way. I replace the table alias irq to instreq and the function works. I believe it is a conflict between the table alias and the function name. I raised the issue and got help on the mail list: http://www.nabble.com/strange-plpgsql-error-td25847709.html#a25848066 Thanks and regards. Balazs -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs