Merge pull request #143 from CartoDB/readd-update-updated-at

Readd update_updated_at function (still used by old tables)
This commit is contained in:
Alejandro Martínez 2015-09-09 17:09:06 +02:00
commit c460b59c07

View File

@ -280,6 +280,16 @@ BEGIN
END; END;
$$ LANGUAGE plpgsql VOLATILE; $$ LANGUAGE plpgsql VOLATILE;
--- Trigger to update the updated_at column. No longer added by default
--- but kept here for compatibility with old tables which still have this behavior
--- and have it added
CREATE OR REPLACE FUNCTION _CDB_update_updated_at()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at := now();
RETURN NEW;
END;
$$ LANGUAGE plpgsql VOLATILE;
-- Auxiliary function -- Auxiliary function
CREATE OR REPLACE FUNCTION cartodb._CDB_is_raster_table(schema_name TEXT, reloid REGCLASS) CREATE OR REPLACE FUNCTION cartodb._CDB_is_raster_table(schema_name TEXT, reloid REGCLASS)