> That's a different issue than whether currval() is subject to
> interference from other transactions. And just wait until PostgreSQL
> 8.1 comes out and people start using lastval() -- then it could get
> *really* confusing which sequence value you're getting.
What happens if an INSERT trigger inserts something into another table
which also has a sequence ?