Skip to content

Commit

Permalink
Merge pull request #143 from CartoDB/readd-update-updated-at
Browse files Browse the repository at this point in the history
Readd update_updated_at function (still used by old tables)
  • Loading branch information
zenitraM committed Sep 9, 2015
2 parents 0ec5799 + 9ec5d90 commit c460b59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts-available/CDB_CartodbfyTable.sql
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ BEGIN
END;
$$ 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
CREATE OR REPLACE FUNCTION cartodb._CDB_is_raster_table(schema_name TEXT, reloid REGCLASS)
Expand Down

0 comments on commit c460b59

Please sign in to comment.