Here is the body of the code that runs the query and fetch results:
with connection.cursor() as cursor:
sql = (
...
)
cursor.execute(sql, [params...])
columns = [col[0] for col in cursor.description]
for row in cursor.fetchall():
print(row)
The results from this code is the following :
('Tue', Decimal('331.0000000000000000'))
('Wed', Decimal('331.0000000000000000'))
('Thu', Decimal('403.0000000000000000'))
('Fri', Decimal('403.0000000000000000'))
And if I extract the generated query (from cursor.cursor.query) and run it in pgadmin I get:
"Tue";331.0000000000000000
"Wed";288.0000000000000000
"Thu";403.0000000000000000
"Fri";51.0000000000000000
I checked that is it the same DB (same docker container at 0.0.0.0 in both case),
I am quite surprised to see such an unexpected behaviour, this breaks a bit the trust I had in the Django Db layer :/
Hopes this gives you ideas,
Cheers