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


On Saturday, 8 September 2018 13:54:02 UTC+2, Jason wrote:
Hard to say what's happening without any code. 

-- 

This message including attachments is confidential and may be legally 
protected from disclosure. If you are not the intended recipient, please 
notify the sender by return email immediately. Any disclosure, 
reproduction, copying, distribution, or other dissemination use of this 
communication is strictly prohibited.
The sender of this email is 
representing Terabee SAS and can only conclude any binding agreement under 
final approval by the company's management authority.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/17d87400-a04c-45af-81f9-c787ce850d4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to