jefflessard
Programmer
Hi, i would like to know if there is any way to bypass this sequence problem?
...
create table myTable
(
pk SERIAL PRIMARY KEY,
value varchar check(value!='')
);
==>insert into myTable (value) values ('');
==>ERROR: ExecAppend: rejected due to CHECK constraint mytable_value
it's still ok but...
==>insert into myTable (value) values ('abc');
==>INSERT 18407 1
Now i would expect that pk of value == 'abc' to be 1
but here's the results:
==> select * from myTable;
pk | value
----+-------
2 | abc
I need to fix this!
...
create table myTable
(
pk SERIAL PRIMARY KEY,
value varchar check(value!='')
);
==>insert into myTable (value) values ('');
==>ERROR: ExecAppend: rejected due to CHECK constraint mytable_value
it's still ok but...
==>insert into myTable (value) values ('abc');
==>INSERT 18407 1
Now i would expect that pk of value == 'abc' to be 1
but here's the results:
==> select * from myTable;
pk | value
----+-------
2 | abc
I need to fix this!