Re: simple division

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Martin Mueller <martinmueller(at)northwestern(dot)edu>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: simple division
Date: 2018-12-04 21:06:29
Message-ID: CAKFQuwZ-OXBEXjLa0i_1SwyiiiEwMcfuhZyC3cpe2aKZRpcJag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 4, 2018 at 1:57 PM Martin Mueller
<martinmueller(at)northwestern(dot)edu> wrote:
>
> I didn't formulate my question properly, because the query went like
> "select alldefects /wordcount"
> where alldefects and wordcount are integers. But none of the different ways of putting the double colon seemed to work.

IDK...the first thing that came to mind was to just stick it at the
end of the expression:

select x/y::numeric from (values (10,4)) vals (x,y)

And it worked...

If you want to propose a concrete documentation patch more power to
you but this doesn't come up enough to think that what we have is
materially deficient. I'm sorry you are having trouble with it but
the lists do provide quick and customized answers for situations like
this.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2018-12-04 21:08:30 Re: simple division
Previous Message Martin Mueller 2018-12-04 20:57:25 Re: simple division