"Christian Leclerc" <cleclerc@ilog.fr> writes:
> I'm encountering a performance issue with insert statements.
It looks to me like your trigger is the entire cause of the slowness.
I think you would be well advised to get rid of it and use a serial
column (ie a sequence object) instead of a handmade, poorly performing
substitute for sequences.
regards, tom lane