Sean,
You are creating the table and your sequence "by hand".
In this case, you must always reset the new sequence by hand as well, after inserting a value explicitly.
And since you do all of this by hand, you should disable Informix serial emulation (see documentation)
Automatic PostgreSQL serial sequence reset is only supported, if the table is created with the PostgreSQL SERIAL type.
The ODI driver is able to find the underlying sequence of the SERIAL column.
But if you create the sequence by hand, it's not possible.
To see what happens behind the scene, export FGLSQLDEBUG=3 env var, and run you program again.
Then drop and re-create the table with SERIAL column, and try again with FGLSQLDEBUG set.
Search for "Find serial info":
SQL: INSERT INTO tab1 (pkey,name) VALUES (100,'aaaa')
| 4gl source : pgs-serial.4gl line=16
| ../ODI_common.h:00816(3) : adaptStatement: stmt type = 2
| ../ODI_common.h:00821(3) : adaptStatement: ifxemul = 1
| pgs.c:00869(3) : Find serial info: [select ns.nspname||'.'||substring(pg_get_expr(a.adbin,0) from 'nextval.''([^'']*)') seqname , c.attname from pg_class p join pg_attrdef a on (p.oid=a.adrelid) join pg_attribute c on (p.oid=c.attrelid and a.adnum=c.attnum) join pg_namespace ns on (p.relnamespace=ns.oid) where upper(p.relname)=upper('tab1') and pg_get_expr(a.adbin,0) like 'nextval%' and (ns.nspname=current_schema() or ns.oid=pg_my_temp_schema())]
| pgs.c:01853(3) : Prefetch rows = 0
| pgs.c:01755(3) : Nat stmt1 = insert into tab1 (pkey,name) VALUES (100,'aaaa') returning tab1.pkey, (select case when tab1.pkey>=(select last_value from public.tab1_pkey_seq) then setval('public.tab1_pkey_seq',tab1.pkey,true) else 0 end)
| sqlcode : 0
| sqlerrd3 : 1
| curr driver : ident='dbmpgs'
| curr connection : ident='test1@localhost:5436+driver='dbmpgs',resource='test1'' (dbspec=[test1@localhost:5436+driver='dbmpgs',resource='test1'])
| Timestamp : 2022-07-05 14:53:07.01594
| Execution time : 0 00:00:00.00650
Seb