André José Guergolet <AGuergolet@compugraf.com.br> writes:
> INSERT INTO table1 (date, field2, field3) VALUES (now,'value2','value3');
> SELECT last_value FROM seq_table1;
You should never ever look directly at the sequence table (except
perhaps for manual debugging purposes). I think you may have confused
this with use of the lastval() function --- currval() or sometimes
lastval() are the appropriate way to get the last-assigned value.
regards, tom lane