This function returns the current state of the specified sequence and atomically increments it by one. The next call will thus return a number one greater than the previous. The sequence is shared between all connections and all transactions so an increment that is is made in one of connection will be seen in other connection immediately. Using a sequence never involves locking.
The function returns integer