> > which is probably not what you might expect. > No, indeed it is not.
My solution - which seems to be working - is replacing: new.my_table_id with: currval(pg_get_serial_sequence('my_table', 'my_table_id')) in the on_insert rule This does the trick. Thanks, Gissur Þórhallsson Loftmyndir ehf. Laugavegur 13 IS 101 Reykjavík - Iceland sími (tel): (+354) 540 2500 tölvupóstur (email): gis...@loftmyndir.is