Hello
I have a web application that uses Hibernate, it always failed when inserts data to any table that uses serial. Then I try to do simulation and I got this error "currval of sequence is not yet defined in this session" after insertion on PGXL 9.5r1.4.
Any response will be helpful.
Thank you.
[postgres@coor1 ~]$ psql -d testdb
psql (PGXL 9.5r1.4, based on PG 9.5.5 (Postgres-XL 9.5r1.4))
Type "help" for help.
testdb=# select currval('emp_id_seq');
ERROR: currval of sequence "emp_id_seq" is not yet defined in this session
testdb=# insert into emp (name, gender) values ('Chase', 'F');
INSERT 0 1
testdb=# select * from emp;
id | name | gender
----+----------+--------
1 | Andy | M
3 | Benjamin | M
4 | Chase | F
(3 rows)
testdb=# select currval('emp_id_seq');
ERROR: currval of sequence "emp_id_seq" is not yet defined in this session