metabib.compressed_display_entry (view)

This is a database view, not a base table. It has no triggers, indexes, or FK constraints of its own. Querying this view may be more efficient than joining the underlying tables directly.

Columns

Column Type Nullable Notes

source

bigint

Yes

name

text

Yes

multi

boolean

Yes

label

text

Yes

field

integer

Yes

value

json

Yes

View Definition

 SELECT flat_display_entry.source,
    flat_display_entry.name,
    flat_display_entry.multi,
    flat_display_entry.label,
    flat_display_entry.field,
        CASE
            WHEN flat_display_entry.multi THEN to_json(array_agg(flat_display_entry.value))
            ELSE to_json(min(flat_display_entry.value))
        END AS value
   FROM metabib.flat_display_entry
  GROUP BY flat_display_entry.source, flat_display_entry.name, flat_display_entry.multi, flat_display_entry.label, flat_display_entry.field;