From: | "Balazs Klein" <Balazs(dot)Klein(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #5108: plpgsql function name conflict with table alias |
Date: | 2009-10-12 07:54:16 |
Message-ID: | 200910120754.n9C7sGj6063983@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 5108
Logged by: Balazs Klein
Email address: Balazs(dot)Klein(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-10-12 14:15:15 | Re: BUG #5108: plpgsql function name conflict with table alias |
Previous Message | Bruce Momjian | 2009-10-10 10:08:49 | Re: BUG #5103: "pg_ctl -w (re)start" fails with custom unix_socket_directory |