delete_gc — Delete a follow's group composition data
BOOLEAN
delete_gc
(
|
followdate, | |
chimpid); |
DATE
followdate
;
VARCHAR(5)
chimpid
;
BOOLEAN
delete_gc
(
|
followid); |
INT
followid
;The follow for which group composition should be deleted may be designated either by supplying the date and mother of the follow or by supplying the id of the follow.
delete_gc deletes all of a follow's
related group composition information -- the related rows in
RAW_GROUPS,
RAW_GROUPMEMBERS, GROUPS,
and GROUPMEMBERS are deleted.
This function orders the deletes in such a way that performance may be improved by orders of magnitude. It is therefore the preferred way to delete group composition.
This function returns TRUE if the supplied follow
exists and group comp rows are deleted and FALSE
otherwise.
The following example demonstrates how to delete all of the automatically generated group compositions.
Example 6.1. Deleting Automatically Generated Group Compositions
SELECT delete_gc(follows.followid)
FROM follows
WHERE EXISTS (SELECT 1
FROM intervals
JOIN sheets
ON (sheets.sheetid = intervals.sheetid)
JOIN fieldfollows
ON (fieldfollows.ffid = sheets.ffid)
WHERE intervals.followid = follows.followid
AND fieldfollows.gcstatus = 'A');