Update api.vessel_details_fn, fix length

This commit is contained in:
xbgmsharp
2024-01-29 21:45:26 +01:00
parent 22b04334f8
commit e727954f83

View File

@@ -248,7 +248,7 @@ BEGIN
'ship_type', (SELECT ais.description FROM aistypes ais, tbl t WHERE t.ship_type = ais.id), 'ship_type', (SELECT ais.description FROM aistypes ais, tbl t WHERE t.ship_type = ais.id),
'country', (SELECT mid.country FROM mid, tbl t WHERE LEFT(cast(t.mmsi as text), 3)::NUMERIC = mid.id), 'country', (SELECT mid.country FROM mid, tbl t WHERE LEFT(cast(t.mmsi as text), 3)::NUMERIC = mid.id),
'alpha_2', (SELECT o.alpha_2 FROM mid m, iso3166 o, tbl t WHERE LEFT(cast(t.mmsi as text), 3)::NUMERIC = m.id AND m.country_id = o.id), 'alpha_2', (SELECT o.alpha_2 FROM mid m, iso3166 o, tbl t WHERE LEFT(cast(t.mmsi as text), 3)::NUMERIC = m.id AND m.country_id = o.id),
'length', t.ship_type, 'length', t.length,
'beam', t.beam, 'beam', t.beam,
'height', t.height, 'height', t.height,
'plugin_version', t.plugin_version, 'plugin_version', t.plugin_version,