I create a sequence but the nextval its working bat, nextval show me a bigger value that the currval('') no the next one.
For example: the currval('') show 50 and the nextval('') show 120 and then nextval('') show 121!!!
I think it may be something to do with the connection session you are in. I quote from the Postgresql manual:
Return the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Notice that because this is returning a session-local value, it gives a predictable answer even if other sessions are executing nextval meanwhile. '