Skip site navigation (1) Skip section navigation (2)

Correcting Error message

From: Piyush Newe <piyush(dot)newe(at)enterprisedb(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Correcting Error message
Date: 2010-02-26 08:30:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

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
office: +91 20 3058 9500

EnterpriseDB Blog:
Follow us on Twitter:

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.

Attachment: Function_error_message.patch
Description: text/x-diff (477 bytes)


pgsql-hackers by date

Next:From: Greg SmithDate: 2010-02-26 08:33:35
Subject: Hot Standby query cancellation and Streaming Replication integration
Previous:From: Mark MielkeDate: 2010-02-26 08:13:31
Subject: Re: Avoiding bad prepared-statement plans.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group