Project

General

Profile

« Previous | Next » 

Revision 14123

schemas/util.sql: cluster_once(): use simpler IS DISTINCT FROM instead of array !=

View differences:

trunk/schemas/util.sql
863 863
    LANGUAGE plpgsql STRICT
864 864
    AS $_$
865 865
BEGIN
866
    -- not yet clustered (ARRAY[] compares NULLs literally)
867
    IF ARRAY[util.cluster_index(table_)] != ARRAY[index] THEN
868
        EXECUTE $$CLUSTER $$||table_||$$ USING $$||index;
869
    END IF;
866
	IF util.cluster_index(table_) IS DISTINCT FROM index THEN
867
		-- not yet clustered
868
		EXECUTE $$CLUSTER $$||table_||$$ USING $$||index;
869
	END IF;
870 870
END;
871 871
$_$;
872 872

  

Also available in: Unified diff