[Babase] follow up on yesterday's conference call

Karl O. Pinc kop at meme.com
Fri Mar 26 12:14:28 EDT 2010


On 03/26/2010 10:53:37 AM, Niki Learn wrote:


> On BIL to AMO, I think getting him linked to the correct pid should 
> be
> the
> only sticky part.  It might even require removal of certain checks
> temporarily while we delete the pid from BIL and add it to AMO.  I'm
> thinking it probably can't be done with them all in place.

That's always a possibility.  Removing and re-adding many, but not
all, checks is relatively straightforward; although spooky
because the updates that happen without rules in place
are, surprise, not checked.

The checks that are difficult to remove/replace are those
that require an ID be present in another table, e.g. creating
a row for an Sname that's not on BIOGRAPH, a Pid not on
PREGS, etc.  These are known as foreign key constraints.
I suspect that these may be the rules that
cause the most problem.  However there is a database
feature that may make life easier.  You may find that
working within a transaction and deferring the foreign
key constraint checking until you've done all the updating
is the route to solving your problem.  See:
http://www.postgresql.org/docs/8.1/static/sql-set-constraints.html

It's hard to say what's easiest/best.  I'd prefer that the
checks remain in place but there's no point in struggling.
I'll leave it to Niki and Lacey to decide at what point
to call me in and see about temporarily turning rules off.

Karl <kop at meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein




More information about the Babase mailing list