View Single Post

   
  #9 (permalink)  
Old 04-15-2008, 11:48 PM
Gregory Stark
 
Posts: n/a
Default Re: writing a MIN(RECORD) aggregate

"Sam Mason" <sam@samason.me.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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply With Quote