Cliff Pratt wrote: > I want to write a row... Hi Points 1-3: this sounds like a problem that can be solved by appropriate unique indexes on the table, which would then generate an error automatically on insert. On point four, see http://archives.postgresql.org/pgsql-novice/2003-08/msg00163.php currval is your friend. Cheers, Peter