Changeset 4913 for TI01-discovery


Ignore:
Timestamp:
10/02/09 12:23:48 (11 years ago)
Author:
sdonegan
Message:

Incorporates more "delete" functionality for spatial and temporal tables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/tags/stable-TI01-ingestAutomation_Proglue_upgradesAndReporting/temp/database/ingest_procedures.sql

    r3967 r4913  
    4949    BEGIN 
    5050        -- This deletes a document from the DB 
     51 
     52        -- get temporal_data_id from spatial_temporal_data (SJD 090209) 
     53        tdID := SELECT temporal_data_id FROM SPATIAL_TEMPORAL_DATA WHERE original_document_id = original_document_id_in; 
     54        DELETE FROM temporal_data WHERE temporal_data_id = tdID; 
     55 
     56        --get spatial_data_id from spatial_temporal data (SJD 090209) 
     57        sdID := SELECT spatial_data_id FROM SPATIAL_TEMPORAL_DATA WHERE original_document_id = original_document_id_in; 
     58        DELETE FROM spatial_data WHERE spatial_data_id = sdID; 
     59 
    5160        DELETE FROM TRANSFORMED_DOCUMENT WHERE original_document_id = original_document_id_in; 
    52                 DELETE FROM SPATIAL_TEMPORAL_DATA WHERE original_document_id = original_document_id_in; 
     61        DELETE FROM SPATIAL_TEMPORAL_DATA WHERE original_document_id = original_document_id_in; 
    5362        DELETE FROM ORIGINAL_DOCUMENT WHERE original_document_id = original_document_id_in; 
     63 
    5464        END; 
    5565$$ LANGUAGE 'plpgsql'; 
Note: See TracChangeset for help on using the changeset viewer.