AAAHHH, I DID IT!!!!
That:
SQL="SELECT nextval('koe_pkey_id');
INSERT INTO koe (id, name) VALUES
(SELECT currval('koe_pkey_id'), 'uusi');"
Now it returns the correct Serial value of the record it inserts.
Yee, I'm glad now
:-D
Thank you all and have a good weekend!
Esa Pikkarainen