~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/schema/patch-2208-75-1.sql

MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
SET client_min_messages=ERROR;
3
 
 
4
 
 
5
 
CREATE OR REPLACE FUNCTION bug_summary_flush_temp_journal() RETURNS VOID
6
 
LANGUAGE plpgsql VOLATILE AS
7
 
$$
8
 
DECLARE
9
 
    d bugsummary%ROWTYPE;
10
 
BEGIN
11
 
    -- may get called even though no summaries were made (for simplicity in the
12
 
    -- callers)
13
 
    PERFORM ensure_bugsummary_temp_journal();
14
 
    FOR d IN SELECT * FROM bugsummary_temp_journal LOOP
15
 
        PERFORM bugsummary_journal_ins(d);
16
 
    END LOOP;
17
 
    TRUNCATE bugsummary_temp_journal;
18
 
END;
19
 
$$;
20
 
 
21
 
COMMENT ON FUNCTION bug_summary_flush_temp_journal() IS
22
 
'flush the temporary bugsummary journal into the bugsummaryjournal table';
23
 
 
24
 
 
25
 
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 75, 1);