mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 11:17:46 +00:00
Follow best practive don't use timestamp(0)
https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_timestamp.280.29_or_timestamptz.280.29
This commit is contained in:
@@ -46,7 +46,7 @@ CREATE OR REPLACE VIEW api.vessels_view WITH (security_invoker=true,security_bar
|
|||||||
SELECT
|
SELECT
|
||||||
v.name as name,
|
v.name as name,
|
||||||
v.mmsi as mmsi,
|
v.mmsi as mmsi,
|
||||||
v.created_at::timestamp(0) as created_at,
|
v.created_at as created_at,
|
||||||
m.last_contact as last_contact,
|
m.last_contact as last_contact,
|
||||||
((NOW() AT TIME ZONE 'UTC' - m.last_contact::TIMESTAMPTZ) > INTERVAL '70 MINUTES') as offline,
|
((NOW() AT TIME ZONE 'UTC' - m.last_contact::TIMESTAMPTZ) > INTERVAL '70 MINUTES') as offline,
|
||||||
(NOW() AT TIME ZONE 'UTC' - m.last_contact::TIMESTAMPTZ) as duration
|
(NOW() AT TIME ZONE 'UTC' - m.last_contact::TIMESTAMPTZ) as duration
|
||||||
|
Reference in New Issue
Block a user