Re: Last inserted row id with complex PK - Mailing list pgsql-general

From Sameer Kumar
Subject Re: Last inserted row id with complex PK
Date
Msg-id CADp-Sm5domLucpSduUhHdweY4e1N--LjUUxzk0TJ9o5o7LZmYg@mail.gmail.com
Whole thread Raw
In response to Last inserted row id with complex PK  (Nelson Green <nelsongreen84@gmail.com>)
List pgsql-general

On Wed, Jan 8, 2014 at 11:54 PM, Nelson Green <nelsongreen84@gmail.com> wrote:
I have a projects log table with a three column PK,
project_num, person_num, and sequence, where each new entry for a project/person combination increments the sequence, which is not an auto incrementing sequence. Is there any way to retrieve the last entry to the table? For instance, if the last entry for person 427 on project 15 was sequence number 125, is that information available to me anywhere?


Are these 
project_num, person_num FK from some other table? If yes then I would first insert in those tables and use it over here?

Best Regards,
Sameer Kumar | Database Consultant
ASHNIK PTE. LTD.
101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533
M : +65 8110 0350 T: +65 6438 3504 | www.ashnik.com
www.facebook.com/ashnikbiz | www.twitter.com/ashnikbiz

email patch

This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s).

Attachment

pgsql-general by date:

Previous
From: Raghavendra
Date:
Subject: Re: general questions
Next
From: Sameer Kumar
Date:
Subject: Re: How to know server status variable in postgresql?