Postgres UserMarcel, A sequence represents a unique identifier. You can call the function 'nextval' to get the next unique value in the sequence. See related functions here: http://www.postgresql.org/docs/8.2/interactive/functions-sequence.html In this code, I get the next sequence, insert it into a table, and then return the value to the calling function: DECLARE nextseq integer; BEGIN nextseq := nextval('entry_id_seq'); INSERT INTO my_table ( entry_id, entry_text, ) VALUES ( nextseq, p_entry_text, --

Marcel.beutnerHello, Thanks a lot for your answers! But I don't need a sequence which only will be incremented. I need a _real_ GUID just as the newid() function. Is there no way to generate such a GUID? I need a real GUID because I use them further in my host app. And my host app relies on it. Thanks for your answers. Marcel