rebuild_members — re-interpolate the MEMBERS table for an individual, re-construct the Supergroup and Delayed_Supergroup columns, and re-analyze the residency information for the individual's MEMBERS rows
int
rebuild_members
(
|
sname) ; |
char(3)
sname
;This procedure re-interpolates the MEMBERS table for a specific individual. The CENSUS table provides the data necessary to rebuild MEMBERS.
The MEMBERS.Supergroup and Delayed_Supergroup columns and the residency columns on MEMBERS are also re-computed.[308]
[308] See: rebuild_supergroup() and rebuild_residency()
[309] Copying an individual's CENSUS rows into MEMBERS can be accomplished with code like the following:
BEGIN;
-- First remove existing census-like rows for individual "FOO"
DELETE FROM members
WHERE members.sname = 'FOO'
AND members.origin <> 'I';
-- Then copy rows from CENSUS to MEMBERS.
INSERT INTO members (sname, date, grp, origin, interp)
SELECT census.sname, census.date, census.grp, census.status, 0
FROM census
WHERE census.sname = 'FOO'
AND census.status <> 'A';
COMMIT;