pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Glenn Schultz <glenn@bondlab.io>
Cc: pgsql-general@postgresql.org
Subject: Re: using a function in where
Date: Mon, 03 Dec 2018 07:32:02 +0000
Message-ID: <87bm633w74.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CAE-4=KG7ZYpTntiLZfL8AN+3oE2OmxDRDUaoWpeGz+cFxBy9mA@mail.gmail.com>
References: <CAE-4=KG7ZYpTntiLZfL8AN+3oE2OmxDRDUaoWpeGz+cFxBy9mA@mail.gmail.com>

>>>>> "Glenn" == Glenn Schultz <glenn@bondlab.io> writes:

 Glenn> All,
 Glenn> I am using the function below to convert a continuous variable
 Glenn> to a binned value. Sometimes a value other than zero is passed
 Glenn> through the query. For example -.5 result value is passed to the
 Glenn> query result. The basic of the query is below.

 Glenn> select
 Glenn> incentivebin(wac, rate, .25)
 Glenn> from
 Glenn> my_table
 Glenn> where incentivebin(was, rate, .25) = 0

Those two calls to incentivebin() have different parameters - is that an
error in the original query, or a typo in transcribing it to email?

-- 
Andrew (irc:RhodiumToad)




view thread (3+ messages)  latest in thread

Message-ID: <87bm633w74.fsf@news-spur.riddles.org.uk>
Permalink:  ../87bm633w74.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87bm633w74.fsf@news-spur.riddles.org.uk

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, glenn@bondlab.io
  Subject: Re: using a function in where
  In-Reply-To: <87bm633w74.fsf@news-spur.riddles.org.uk>
  References: <CAE-4=KG7ZYpTntiLZfL8AN+3oE2OmxDRDUaoWpeGz+cFxBy9mA@mail.gmail.com> <87bm633w74.fsf@news-spur.riddles.org.uk>

* 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