Re: 7.4 Wishlist - Mailing list pgsql-hackers

From Magnus Naeslund(f)
Subject Re: 7.4 Wishlist
Date
Msg-id 05a801c29a3b$88272550$f80c0a0a@mnd
Whole thread Raw
In response to 7.4 Wishlist  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: 7.4 Wishlist
List pgsql-hackers
Mysql is planning on making this work:
SELECT id, @a:=COUNT(*), SUM(sum_col)/@a FROM table_name GROUP BY id.

Do we have anything like it (After a discussion with Tom i figure no).
User variables is nice, especially in these kind of queries.

Nice would be to be able to use them as in C (almost everywhere):

SELECT id, @x FROM table_name t where (@x := date_part('days'. now() -
f.created)) > 100;

As Tom said in earlier mail, it might not be that big of a win in this
case, but if uses expensive functions, it will.

Magnus



pgsql-hackers by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: 7.3: Change in cursor behaviour?
Next
From: Joel Burton
Date:
Subject: Re: numeric to text (7.3)