Re: Fw: Clipping values - Mailing list pgsql-general

From Ovid
Subject Re: Fw: Clipping values
Date
Msg-id 972778.56617.qm@web65702.mail.ac4.yahoo.com
Whole thread Raw
In response to Re: Fw: Clipping values  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
----- Original Message ----
> From: Tom Lane <tgl@sss.pgh.pa.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



pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: question (or feature-request): over ( partition by ... order by LIMIT N)
Next
From: Frans Hals
Date:
Subject: Large index operation crashes postgres