Changeset 517 for trunk

Show
Ignore:
Timestamp:
11/20/08 18:03:02 (2 months ago)
Author:
denish
Message:

updated saved_graphs before i/u trigger function

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/sql/reconnoiter_ddl_dump.sql

    r515 r517  
    765765    AS $$ 
    766766DECLARE 
     767ref_title text; 
    767768 BEGIN 
    768769 IF TG_OP = 'UPDATE' THEN 
    769    IF (NEW.graph_tags <> OLD.graph_tags OR NEW.title <> OLD.title) THEN 
    770            NEW.ts_search_all=prism.saved_graphs_tsvector(NEW.graphid);  
    771    END IF;     
    772  ELSE 
    773      NEW.ts_search_all = to_tsvector(NEW.title);  
    774  END IF;   
     770              NEW.ts_search_all=prism.saved_graphs_tsvector(NEW.graphid);  
     771  ELSE 
     772      ref_title:=coalesce(replace(NEW.title, '.', ' '), ' '); 
     773     NEW.ts_search_all =to_tsvector(ref_title);  
     774  END IF;   
    775775   RETURN NEW; 
    776776END