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

Re: Correcting Error message

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Piyush Newe <piyush(dot)newe(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Correcting Error message
Date: 2010-02-27 02:44:09
Message-ID: D015AB00-E316-48B6-8B25-22D510A6914D@seespotcode.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Feb 26, 2010, at 21:03 , Tom Lane wrote:

> Michael Glaesemann <grzm(at)seespotcode(dot)net> writes:
>> On Feb 26, 2010, at 3:30 , Piyush Newe wrote:
>>> SELECT (footable.*).foofunc FROM footable;
>>> ERROR:  column footable.foofunc does not exist
>
>> Is that calling syntax correct?  I'd think it should be:
>> SELECT foofunc(footable.*, 10) FROM footable;
>
> He's relying on the f(x) === x.f syntactic equivalence, as per the
> comments for ParseFuncOrColumn:


>> Note there are two arguments to foofunc (in either version)
>
> ... and the example also relies on the presence of default arguments  
> for
> both functions.  This makes both of them match a single-argument call,
> resulting in an ambiguous-function situation.  The proposed change
> would cause it to actually throw an "ambiguous function" error.

Ah! Learned two new things. Thanks, Tom!

Michael Glaesemann
grzm seespotcode net




In response to

pgsql-hackers by date

Next:From: Greg SmithDate: 2010-02-27 02:52:12
Subject: Re: Hot Standby query cancellation and Streaming Replication integration
Previous:From: Greg SmithDate: 2010-02-27 02:43:58
Subject: Re: Hot Standby query cancellation and Streaming Replication integration

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