pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: pgsql-sql@postgresql.org
Cc: Kris Kewley <kris.kewley@gmail.com>
Cc: Another Trad <anothertrad@gmail.com>
Cc: Lee Hachadoorian <lee.hachadoorian@gmail.com>
Subject: Re: LIMIT BASED ON PERCENT
Date: Thu, 19 Nov 2009 07:47:59 +0100
Message-ID: <200911190748.00451.guillaume@lelarge.info> (raw)
In-Reply-To: <E1C9300E-A2D5-4B70-8C4F-6B272915BDBF@gmail.com>
References: <af7271950911181112h574da17euf94d9640ec7680df@mail.gmail.com>
	<200911182027.08857.guillaume@lelarge.info>
	<E1C9300E-A2D5-4B70-8C4F-6B272915BDBF@gmail.com>

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



view thread (11+ messages)

Message-ID: <200911190748.00451.guillaume@lelarge.info>
Permalink:  ../200911190748.00451.guillaume@lelarge.info/
Also on:    postgresql.org/message-id/200911190748.00451.guillaume@lelarge.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: guillaume@lelarge.info, kris.kewley@gmail.com, anothertrad@gmail.com, lee.hachadoorian@gmail.com
  Subject: Re: LIMIT BASED ON PERCENT
  In-Reply-To: <200911190748.00451.guillaume@lelarge.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox