diff --git a/src/storage/postgres/feedstate.go b/src/storage/postgres/feedstate.go index c96acc5..93bc7cc 100644 --- a/src/storage/postgres/feedstate.go +++ b/src/storage/postgres/feedstate.go @@ -87,10 +87,10 @@ func (s *PostgresStorage) UpdateFeedState(feedID int64, params model.UpdateFeedS , coalesce($5, '') ) on conflict (feed_id) do update set - last_refreshed = coalesce($2, last_refreshed), - last_error = coalesce($3, last_error), - http_lmod = coalesce($4, http_lmod), - http_etag = coalesce($5, http_etag) + last_refreshed = coalesce($2, feed_states.last_refreshed), + last_error = coalesce($3, feed_states.last_error), + http_lmod = coalesce($4, feed_states.http_lmod), + http_etag = coalesce($5, feed_states.http_etag) `, feedID, params.LastRefreshed, diff --git a/src/storage/postgres/item.go b/src/storage/postgres/item.go index 4fa1ef5..560d452 100644 --- a/src/storage/postgres/item.go +++ b/src/storage/postgres/item.go @@ -157,7 +157,7 @@ func listQueryPredicate(filter model.ItemFilter, newestFirst bool) (string, []an args = append(args, filter.Before) } - predicate := "1" + predicate := "true" if len(cond) > 0 { predicate = strings.Join(cond, " and ") }