Re: Nextval & Currval - Mailing list pgsql-sql

From Shavonne Marietta Wijesinghe
Subject Re: Nextval & Currval
Date
Msg-id 00fa01c8cafb$eb8c4660$0602a8c0@DREAM
Whole thread Raw
In response to Nextval & Currval  ("Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it>)
Responses Re: Nextval & Currval
List pgsql-sql
I managed to make the connection work. I tried inserting records from 2 computers. It works fine untill 2 computers insert a nextwall one after another. 
 
Here is a small example of what i see in my DB
 
++++++|+++++++++++++++++|++++++++++
    N °    |       Session                |   Number
++++++|+++++++++++++++++ |++++++++++
  1        |       DB last record       |   269
  2        |       PC A (nextval )      |   270
  3        |       PC A (nextval )      |   271
  4        |       PC A (currval )       |   271
  5        |       PC A (nextval )      |   272
  6        |       PC A (nextval )      |   273
  7        |       PC B (nextval )      |   274
  8        |       PC A (currval )       |   274
  9        |       PC B (nextval )      |   275
  10      |       PC A (nextval )       |   276
 
Isn't currval connected to its session?? I expected line N° 8  (PC A) to have the Number of the record it inserted a while ago (line N° 273).
 
 
Thank you.
 
Shavonne Wijesinghe

pgsql-sql by date:

Previous
From: Bryan Emrys
Date:
Subject: One Text Table or Multiple Text Tables - Design Tradeoffs?
Next
From: "Pavel Stehule"
Date:
Subject: Re: help in writing query