Re: unhelpful error message

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <depesz(at)depesz(dot)com>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: unhelpful error message
Date: 2009-06-18 17:44:03
Message-ID: 4A3A36930200002500027D9C@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Look under "computed fields" in the index ... looks like it's
> towards the bottom of 34.4.2 in the 8.3 docs.
> http://www.postgresql.org/docs/8.3/static/xfunc-sql.html#AEN40267
>
> I had thought it was mentioned somewhere in chapter 4 as well, but
> am not seeing it there right now.

It's used in an example in 34.4.2 without a lot of definition. From
experimenting a bit, it appears that when referencing a composite data
value, any function which can take as its only parameter an instance
of that composite type can be used as though it were a field name.
This includes user functions written in any language, as well as
built-in aggregates (and presumably any other functions which accept a
composite type as the only parameter). Is that correct? Any
restrictions or exceptions? (I assume that they are only allowed to
retrieve values -- it doesn't seem like it would make sense to SET a
value into such a "computed field".)

It's clearly not particular to SQL functions, so it deserves mention
outside of the context you referenced. Chapter 4 does seem like a
good place. Under Column References or Function Calls (or both)?

-Kevin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Obe, Regina 2009-06-18 17:46:03 Re: BUG #4860: Indexes gone after restore
Previous Message Tom Lane 2009-06-18 16:53:23 Re: BUG #4860: Indexes gone after restore