Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

api.total_info_view

Description

total_info_view web view

Table Definition
CREATE VIEW total_info_view AS (
 WITH l AS (
         SELECT count(*) AS logs
           FROM api.logbook
        ), s AS (
         SELECT count(*) AS stays
           FROM api.stays
        ), m AS (
         SELECT count(*) AS moorages
           FROM api.moorages
        )
 SELECT l.logs,
    s.stays,
    m.moorages
   FROM l,
    s,
    m
)

Columns

NameTypeDefaultNullable
logsbiginttrue
mooragesbiginttrue
staysbiginttrue

Referenced Tables

NameColumnsCommentType
api.logbook43The logbook table stores vessel navigation entries with timestamps, locations, and trip metrics. RLS policies filter by vessel_id automatically.
These indexes optimize different query patterns while minimizing storage.
BASE TABLE
api.stays15The stays table records time spent at moorages. Each stay links a moorage with arrival/departure timestamps. RLS policies filter by vessel_id.BASE TABLE
api.moorages14The moorages table stores locations where vessels can stay (marinas, anchorages, etc.). Each moorage has geographic coordinates and metadata.BASE TABLE

Relations

erDiagram


"api.total_info_view" {
  bigint logs ""
  bigint moorages ""
  bigint stays ""
}

Generated by tbls