BUG #5108: plpgsql function name conflict with table alias

Поиск
Список
Период
Сортировка
От Balazs Klein
Тема BUG #5108: plpgsql function name conflict with table alias
Дата
Msg-id 200910120754.n9C7sGj6063983@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5108: plpgsql function name conflict with table alias  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5108
Logged by:          Balazs Klein
Email address:      Balazs.Klein@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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #5103: "pg_ctl -w (re)start" fails with custom unix_socket_directory
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5108: plpgsql function name conflict with table alias