Fetching query result problem

From: Jacek Kałucki <laborm(at)rz(dot)onet(dot)pl>
To: psycopg(at)postgresql(dot)org
Subject: Fetching query result problem
Date: 2012-01-16 12:53:20
Message-ID: 4F141DC0.3040009@rz.onet.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hi.

I have a problem with some query.
When I issue it from within postgresql console, it returns correct rows count as a result,
but when executed within psycopg2 cursor.execute() row count differs.
In first situation I get 5 rows versus 3 at second time.
This is my query:
select "inventory_line"."iid" as "iid",
"inventory_line"."il_depot_id" as "il_depot_id",
"inventory_line"."il_expiry_date" as "il_expiry_date",
"inventory_line"."il_info" as "il_info",
"inventory_line"."il_location_x_id" as "il_location_x_id",
"inventory_line"."il_location_y_id" as "il_location_y_id",
"inventory_line"."il_location_z_id" as "il_location_z_id",
"inventory_line"."il_lot_no" as "il_lot_no",
"inventory_line"."il_package_id" as "il_package_id",
"inventory_line"."il_pass_id" as "il_pass_id",
"inventory_line"."il_product_id" as "il_product_id",
"inventory_line"."il_production_date" as "il_production_date",
"inventory_line"."il_quantity" as "il_quantity",
"inventory_line"."il_quantity_spare" as "il_quantity_spare",
"inventory"."in_close_date" as "in_close_date",
"inventory"."in_inventory_name" as "in_inventory_name"
from "inventory_line"
inner join "inventory_pass" on "inventory_pass"."iid" = "inventory_line"."il_pass_id"
inner join "inventory" on "inventory"."iid" = "inventory_pass"."ip_inventory_id"
where "inventory_line"."il_product_id" = 6326 and "inventory"."in_branch_id" = 1 limit 100

Could you give me any suggestions how to figure the reason out?

--
Regards
Jacek Kałucki

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2012-01-16 13:18:30 Re: Fetching query result problem
Previous Message Peter Irbizon 2012-01-12 00:43:35 Re: after application close MS Visual C++ runtime library error occurs