Documentation of Implicit Function Call /w Composite Types

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Documentation of Implicit Function Call /w Composite Types
Date: 2012-08-27 20:46:32
Message-ID: 01ea01cd8495$0ad9c590$208d50b0$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

With Chris Travers recently going O-R gung-ho on us I decided I wanted to
find out where in the documentation the following behavior is specified:

The expression:

(some_composite).calculated_field

resolves to the function call:

calculated_field(some_composite)

I know I've seen it before, though whether in the docs or in e-mail I am
unsure, but for the life of me browsing for it for about 10 minutes got me
nowhere - and I am not sure how to construct a meaningful search which would
be a secondary means to discover the information IMO.

I am beginning to see the value in having such a syntax but it seems unusual
enough that if it is indeed as powerful as Chris is discovering I would
think finding and espousing on its existence/features in the documentation
would be important. Given that it has to do with functions and composite
types it should probably appear in both (and Advanced Features even) with
cross-references between the various locations.

Thoughts/Comments/Directions?

Thanks!

David J

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2012-08-27 21:59:48 Re: Documentation of Implicit Function Call /w Composite Types
Previous Message Tom Lane 2012-08-27 20:23:00 Re: [GENERAL] Why extract( ... from timestamp ) is not immutable?