Re: Fw: Clipping values

From: Ovid <curtis_ovid_poe(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Fw: Clipping values
Date: 2010-03-24 18:54:39
Message-ID: 972778.56617.qm@web65702.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

----- Original Message ----
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> You could code that directly with CASE
> operations, but it would probably
> be easier to use GREATEST/LEAST, along the
> lines of
> new_percentage = LEAST(num_intervals * .1,
> 1);

Ah, I didn't know about the LEAST function! I love you (platonically, of course. My fiancée might have issues otherwise).

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://blogs.perl.org/users/ovid/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frans Hals 2010-03-24 20:15:56 Large index operation crashes postgres
Previous Message A. Kretschmer 2010-03-24 17:31:59 question (or feature-request): over ( partition by ... order by LIMIT N)