"Sam Mason" <sam(at)samason(dot)me(dot)uk> writes:
> The reason for the sub-select is only because SQL doesn't provide any
> other way to name expressions. Hum, or at least this should work...
> There doesn't seem to be any nice way of getting fields out of a record!
>
> If I really want to do this, it's going to turn into quite an overhaul
> of record handling in PG. It would also remove the nice syntactic trick
> that a.b identifies the field "b" from table "a", and s.a.b means that
> the above is in schema "s".
Yeah, to disambiguate it you have to use (r).i
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning