storage: postgres fixes

This commit is contained in:
nkanaev
2026-06-19 23:43:06 +01:00
parent 06bed5b556
commit 72a2bf605b
2 changed files with 5 additions and 5 deletions

View File

@@ -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,

View File

@@ -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 ")
}