Fwd: BUG IN PGAdmin 4 using AVG function

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: ragain1327(at)gmail(dot)com
Cc: pgadmin-support <pgadmin-support(at)postgresql(dot)org>
Subject: Fwd: BUG IN PGAdmin 4 using AVG function
Date: 2019-08-12 05:59:35
Message-ID: CAG7mmoxZmOZzUisHy6=y2JBGkLAoXdTs7kGp6srKLiTaqKuT+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-bugs

[Adding pgAdmin-support mailing list, and removing pgsql-bugs mailing
list...]

Let me forward it to pgAdmin-support group.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

---------- Forwarded message ---------
From: WrongFeiHung <ragain1327(at)gmail(dot)com>
Date: Sat, Aug 10, 2019 at 3:50 AM
Subject: BUG IN PGAdmin 4 using AVG function
To: <pgsql-bugs(at)lists(dot)postgresql(dot)org>

Good afternoon

I have been working with PGAdmin 4 with no issues, as it is a great user
interface.

The issue I am having has to do with the AVG function when using PGAdmin 4.

The query I am using is:

SELECT AVG(salary) FROM employees;

Using PGAdmin 4, the result returned is 4000000000, or 4 BILLION!

Using SQL Shell (psql), the result returned is 91571.594000000000, which is
correct.

If I unnecessarily change the query to read:

SELECT ROUND(AVG(salary)) FROM employees;

This causes the correct result, which was the same result calculated by
psql.

I am including the mock_data.sql file of the tables and data used, which is
identical to the original used in Udemy course Master SQL for Data Science.

Apologies if the format is out of the ordinary, this is my first bug
report, however I think it is something that definitely needs brought to
your attention.

Thank you,
James Ragain
SQL Data Analyst
ragain1327(at)gmail(dot)com
432-557-4148

Attachment Content-Type Size
mock-data.sql application/sql 119.6 KB

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Akshay Joshi 2019-08-12 06:45:46 Re: BUG IN PGAdmin 4 using AVG function
Previous Message Aditya Toshniwal 2019-08-12 05:42:43 Re: the menu "view/edit data / all rows" strange thing

Browse pgsql-bugs by date

  From Date Subject
Next Message Noah Misch 2019-08-12 06:22:16 Re: BUG #15695: Failure to restore a dump, ERROR: operator does not exist: public.hstore = public.hstore
Previous Message Tom Lane 2019-08-11 23:41:28 Re: BUG #15948: TRGM gin index is not be taken into account when using like all (array)