[partition table] python fetchall or fetchone function can not get the returning rows

From: Xiaoning Xu <xixu(at)bcgsc(dot)ca>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: [partition table] python fetchall or fetchone function can not get the returning rows
Date: 2011-12-21 21:29:51
Message-ID: 20FBD68BF7F3264B889B082B48A82FD66507847EE5@MORBO.phage.bcgsc.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have a problem concerning the partition table.
When I store a record into one of the partition and use "RETURNING table_id" or "RETURNING *",
I expect the same result when calling fetchall or fetchone function as not using partition.
However, it simply returns nothing.

Since the serial primary key of my partition table is the FK of some other tables, I need to get the
id after each insertion.
My solution now is to select the max id from the parent table.
I am wondering if there is any other alternatives to solve this problem.

Thank you in advance!
Xiaoning

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raghavendra 2011-12-21 22:39:38 Why vacumming performed on template1 with initdb command ?
Previous Message Andre Lopes 2011-12-21 21:20:48 Re: How to escape to quotes on Insert into?