Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

PG_GET_LATE_BINDING_VIEW_COLS

Returns the column metadata for all late-binding views in the database. For more information, see Late-Binding Views

Syntax

Copy
pg_get_late_binding_view_cols()

Return Type

VARCHAR

Usage Notes

The PG_GET_LATE_BINDING_VIEW_COLS function returns one row for each column in late-binding views. The row contains a comma-separated list with the schema name, relation name, column name, data type, and column number.

Example

The following example returns the column metadata for all late-binding views.

Copy
select pg_get_late_binding_view_cols(); pg_get_late_binding_view_cols --------------------------------------------- (public,lbv1,c0,integer,1) (public,lbv1,c1,boolean,2) (public,lbv1,c2,"character(45)",3) (public,lbv1,c3,"character varying(256)",4) (public,lbv2,c0,integer,1) (public,lbv2,c1,boolean,2) (public,lbv2,c2,"character(45)",3) (public,lbv2,c3,"character varying(256)",4) (8 rows)

The following example returns the column metadata for all late-binding views in table format.

Copy
select * from pg_get_late_binding_view_cols() cols(view_schema name, view_name name, col_name name, col_type varchar, col_num int); view_schema | view_name | col_name | col_type | col_num -------------+-----------+----------+------------------------+--------- public | lbv1 | c0 | integer | 0 public | lbv1 | c1 | boolean | 1 public | lbv1 | c2 | character(45) | 2 public | lbv1 | c3 | character varying(256) | 3 public | lbv2 | c0 | integer | 0 public | lbv2 | c1 | boolean | 1 public | lbv2 | c2 | character(45) | 2 public | lbv2 | c3 | character varying(256) | 3 (8 rows)