awips2/deltaScripts/13.5.1/removeDeliveryOptions.sql
Dustin Johnson 30ef11dc35 Issue #2038 More information when bandwidth manager can't schedule a subscription
Amend: Peer review comments

Change-Id: If2ae3f98a3a04709c2cdc7632ca89f2ee6a5e08d

Former-commit-id: eef3b4c750 [formerly c76fa3bc2a] [formerly 0a9e7ed740] [formerly eef3b4c750 [formerly c76fa3bc2a] [formerly 0a9e7ed740] [formerly 31e01a9f9a [formerly 0a9e7ed740 [formerly b1414f6aebda59cb6d83d1f0d0154fa4cd850953]]]]
Former-commit-id: 31e01a9f9a
Former-commit-id: fb15a3e115 [formerly fff0172786] [formerly c0c794b2f4803e4344ff77a743a2e92ff060ff70 [formerly 187a1e49ef]]
Former-commit-id: 5348c297fe02bf4aac1eac5eff84f944b168cb83 [formerly 1fab733472]
Former-commit-id: 4ac1c2cbdb
2013-05-29 09:02:47 -05:00

36 lines
1.4 KiB
PL/PgSQL

/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
\set ON_ERROR_STOP 1
\connect metadata;
-- Start a transaction
BEGIN;
-- Update SiteSubscription value entries to not have the notify attribute
update ebxml.value set stringvalue = regexp_replace(stringvalue, 'notify=".*?" ', '', 'g');
-- Update GroupDefinition value entries to not have the option attribute
-- Explanation of how this works: \\1 is the first set of parentheses, \\2 is the second set,
-- So we are removing the option="<anything>" section out of any rows that have it and stitching the
-- data back together.
update ebxml.value set stringvalue = regexp_replace(stringvalue, '(<groupDefinition.*?)option=".*?"(.*)', E'\\1\\2', 'g');
-- Commit the transaction
END;