Views (late-binding) v1

Description

This page provides information about late-binding views in the database.

I provide no information about the columns in a view because the function which provides this information, pg_catalog.pg_get_late_binding_view_cols(), returns rows only for valid late-binding views and so validates views, and in doing so, turns out to have fatal performance problems (for that, read “freezes up”) when the number and complexity of views becomes high enough.

Also, anyway, the function ignores syslog unrestricted and the new Redshift-style privilege access system table, and so users can see only their own rows, or, if they are superuser, all rows, so although I can see all late-binding views in pg_class, if I’m not admin (and the user I use is not) then I can only see rows for my own late-binding views anyway, and the user I use had none :-)

Note the creation and age columns which are found for tables are missing, as Redshift does not store the creation time for a view.

  1. Notes regarding views

Columns

Name Type
schema_id int8
schema varchar
view_id int8
view varchar
owner_user_id int4
owner varchar
length int4
related pages varchar

Column Descriptions

schema_id

The schema ID. This column is emitted in CSV exports only.

schema

The schema ID. This column is emitted in CSV exports only.

view_id

The view ID. This column is emitted in CSV exports only.

Surprisingly, view IDs turn out to be unique across all databases.

view

The view name.

owner_user_id

The owner user ID. This column is emitted in CSV exports only.

owner

The owner user name.

length

The length of the view text, in bytes.