Revision 14123
Added by Aaron Marcuse-Kubitza over 10 years ago
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
schemas/util.sql: cluster_once(): use simpler IS DISTINCT FROM instead of array !=