Re: parser oddity (t.count) - Mailing list pgsql-hackers

From Andreas Zeugswetter
Subject Re: parser oddity (t.count)
Date
Msg-id 00052608293001.00143@zeus
Whole thread Raw
In response to Re: parser oddity (t.count)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> to hear about, foo.bar and bar(foo) are considered near-equivalent
> notations by the parser.  It looks like when it couldn't find 'count' as
> a field name, it tried and succeeded to interpret it as a function call
> instead.
> 

> It works in the other direction too: field(foo) will be interpreted as
> foo.field if foo has a column named field.
> 
> This equivalence can be pretty confusing if you don't know about it, but
> I'm hesitant to suggest ripping it out because of the risk of breaking
> old applications.  Anyone have strong opinions one way or the other?

This feature is sacrosanct for me, if you ripp it, you take away the
feature to add calculated columns to tables.

The important part for me, is that foo.calcit calls the function calcit(foo).

Andreas


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Berkeley DB...
Next
From: "Matthias Urlichs"
Date:
Subject: Re: Berkeley DB...