Re: LIMIT BASED ON PERCENT

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgsql-sql(at)postgresql(dot)org
Cc: Kris Kewley <kris(dot)kewley(at)gmail(dot)com>, Another Trad <anothertrad(at)gmail(dot)com>, Lee Hachadoorian <lee(dot)hachadoorian(at)gmail(dot)com>
Subject: Re: LIMIT BASED ON PERCENT
Date: 2009-11-19 06:47:59
Message-ID: 200911190748.00451.guillaume@lelarge.info
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Le jeudi 19 novembre 2009 à 01:20:24, Kris Kewley a écrit :
> Could you not create a function to do this instead?
>
> Set var_limit = 20% of row count
> Replace subquery with var_limit
>

Sure, see the previous mails from Pavel. You can also put the percent as a
parameter of the function.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oliveiros C, 2009-11-19 15:11:10 Re: need nelp with aggregate functions
Previous Message Kris Kewley 2009-11-19 00:20:24 Re: LIMIT BASED ON PERCENT