Re: [GENERAL] Last inserted row id with complex PK

2014-01-09 Thread Nelson Green
On Wed, Jan 8, 2014 at 5:39 PM, Alban Hertroys wrote: > On 08 Jan 2014, at 16:54, Nelson Green 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 a

Re: [GENERAL] Last inserted row id with complex PK

2014-01-09 Thread Francisco Olarte
Hi Nelson: On Wed, Jan 8, 2014 at 7:14 PM, Nelson Green wrote: > My apologies, I was not completely clear. I will not know any of the columns > in advance. The most recent insert is the result of user input from a web > form, so I won't know what project or what user generated the last insert. >

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread John R Pierce
On 1/8/2014 10:14 AM, Nelson Green wrote: On Wed, Jan 8, 2014 at 4:54 PM, Nelson Green mailto:nelsongree...@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

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Sameer Kumar
On Wed, Jan 8, 2014 at 11:54 PM, Nelson Green 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 ret

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Alban Hertroys
On 08 Jan 2014, at 16:54, Nelson Green 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 retrie

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Nelson Green
On Wed, Jan 8, 2014 at 1:24 PM, David Johnston wrote: > Nelson Green wrote > > My apologies, I was not completely clear. I will not know any of the > > columns in advance. The most recent insert is the result of user input > > from > > a web form, so I won't know what project or what user generat

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread David Johnston
Nelson Green wrote > My apologies, I was not completely clear. I will not know any of the > columns in advance. The most recent insert is the result of user input > from > a web form, so I won't know what project or what user generated the last > insert. That was why I wandered if that information

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Nelson Green
On Wed, Jan 8, 2014 at 10:22 AM, Tom Lane wrote: > Francisco Olarte writes: > > Hi Nelson: > > On Wed, Jan 8, 2014 at 4:54 PM, Nelson Green > 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 c

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Nelson Green
On Wed, Jan 8, 2014 at 10:09 AM, Francisco Olarte wrote: > Hi Nelson: > > On Wed, Jan 8, 2014 at 4:54 PM, Nelson Green > 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

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Tom Lane
Francisco Olarte writes: > Hi Nelson: > On Wed, Jan 8, 2014 at 4:54 PM, Nelson Green 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 incre

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Francisco Olarte
Hi Nelson: On Wed, Jan 8, 2014 at 4:54 PM, Nelson Green 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

[GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Nelson Green
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 e