create or replace

This commit is contained in:
Sam Saffron 2017-05-25 18:12:45 -04:00
parent 2820cf2b50
commit 1a1f5d2101
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ SQL
# we need this function for performance reasons # we need this function for performance reasons
execute <<SQL execute <<SQL
CREATE FUNCTION first_unread_topic_for(user_id int) CREATE OR REPLACE FUNCTION first_unread_topic_for(user_id int)
RETURNS timestamp AS RETURNS timestamp AS
$$ $$
SELECT COALESCE(first_topic_unread_at, 'epoch'::timestamp) SELECT COALESCE(first_topic_unread_at, 'epoch'::timestamp)