0

PostgreSQL v12 introduced log10() as an alias for the single-argument invocation of log(). However, most hosting providers are still on PostgreSQL v11 or earlier at this time, which do not support log10(). In order to make code portable, how can log10() be aliased to log() in earlier version of PostgreSQL?

3
  • Does this answer your question? Function alias for Postgres default function Commented Feb 22, 2020 at 16:45
  • Just use log(x). Postgres v12 Mathematical Functions contains both log(x) and log10(x) but both return log to base 10. So its portable for v10 to v12. The only Problem would be downgrading from v12 to v10. Commented Feb 22, 2020 at 23:03
  • @Belayer My code has to be portable cross-systems, so I need log10(). Commented Feb 23, 2020 at 9:12

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.