Re: BUG #16901: log(1, anyvalue) gives division by zero error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: samuelwoodward(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16901: log(1, anyvalue) gives division by zero error
Date: 2021-02-26 16:55:56
Message-ID: 309302.1614358556@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> for example log(1, 10) gives division by zero error whereas log10(1) gives 0

I think you have the arguments backwards: the equivalent
computation is log(10, 1) not log(1, 10).

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Samuel Woodward 2021-02-26 18:14:58 Re: BUG #16901: log(1, anyvalue) gives division by zero error
Previous Message Tom Lane 2021-02-26 16:40:13 Re: BUG #16900: SELECT MAX subquery not allowed in WHERE clause when using WITH RECURSIVE