[Cl-perec-devel] *oid-instance-id-sequence-exists*

Leslie P. Polzer leslie.polzer at gmx.net
Tue Aug 26 09:02:28 UTC 2008

This global special doesn't cope well with multiple database
initialization and scenarios where a database needs to be
reinitialized because it was purged of all tables.

There are at least three possibilities of fixing:

  a) get rid of it

  b) use a hash table to record which db has been initialized

  c) catch db error 42P01 (relation doesn't exist)
     when trying to access the sequence and create it

Solution a) incurs a performance hit, but I'm not sure how
severe it is.

Solution b) fixes the case of multiple databases
that need to be initialized but doesn't solve the issue of

Not sure about solution c). It's efficient and fixes
both cases, but I'm not sure whether you like it
because it produces db errors. Plus it might hide
some unrelated errors...



More information about the cl-perec-devel mailing list