fix postgres duration queries to return expected integer type
[websub-hub] / src / db / postgres / sql / topic-get-by-url.sql
1 -- excluding content field
2 SELECT
3 id,
4 created,
5 url,
6 extract(epoch FROM lease_seconds_preferred)::integer AS lease_seconds_preferred,
7 extract(epoch FROM lease_seconds_min)::integer AS lease_seconds_min,
8 extract(epoch FROM lease_seconds_max)::integer AS lease_seconds_max,
9 publisher_validation_url,
10 content_hash_algorithm,
11 is_active,
12 is_deleted,
13 last_publish,
14 content_fetch_next_attempt,
15 content_fetch_attempts_since_success,
16 content_updated,
17 content_hash,
18 content_type,
19 http_etag,
20 http_last_modified
21 FROM topic
22 WHERE url = $(topicUrl)