Correcting Error message

Поиск
Список
Период
Сортировка
От Piyush Newe
Тема Correcting Error message
Дата
Msg-id 3b3d33c91002260030q6ad98587xeed97a94f63013a0@mail.gmail.com
обсуждение исходный текст
Ответы Re: Correcting Error message  (Michael Glaesemann <grzm@seespotcode.net>)
Список pgsql-hackers
Hi,

Consider following testcase,

CREATE TABLE footable(id int4, name varchar2(10));

CREATE FUNCTION foofunc(a footable, b integer DEFAULT 10)
  RETURNS integer AS $$ SELECT 123; $$ LANGUAGE SQL;

CREATE FUNCTION foofunc(a footable, b numeric DEFAULT 10)
  RETURNS integer AS $$ SELECT 123; $$ LANGUAGE SQL;

SELECT (footable.*).foofunc FROM footable;
ERROR:  column footable.foofunc does not exist
LINE 1: SELECT (footable.*).foofunc FROM footable;
               ^

The error message thrown is seems to be wrong. When I dig into the code, I found in function ParseFuncOrColumn(), if we just add small condition it will throw correct error message. i.e. " function foofunc(footable) is not unique". I have made a slight change in code, which is throwing the correct error message now. The code changes are attached in the patch.

--
Piyush S Newe
Principal Engineer
EnterpriseDB
office: +91 20 3058 9500
www.enterprisedb.com

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.

Вложения

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

Предыдущее
От: Gokulakannan Somasundaram
Дата:
Сообщение: Re: A thought on Index Organized Tables
Следующее
От: Greg Smith
Дата:
Сообщение: Re: A thought: should we run pgindent now?