PG_GET_LATE_BINDING_VIEW_COLS - Amazon Redshift

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

PG_GET_LATE_BINDING_VIEW_COLS

傳回資料庫中所有近期繫結檢視的欄中繼資料。如需詳細資訊,請參閱「」近期繫結檢視

Syntax (語法)

pg_get_late_binding_view_cols()

傳回類型

VARCHAR

使用須知

PG_GET_LATE_BINDING_VIEW_COLS 函數針對近期繫結檢視中的每一欄,各傳回一列。列包含結構描述名稱、關係名稱、欄名稱、資料類型及欄號的逗號分隔清單。

範例

下列範例傳回所有近期繫結檢視的欄中繼資料。

select pg_get_late_binding_view_cols(); pg_get_late_binding_view_cols ------------------------------------------------------------ (public,myevent,eventname,"character varying(200)",1) (public,sales_lbv,salesid,integer,1) (public,sales_lbv,listid,integer,2) (public,sales_lbv,sellerid,integer,3) (public,sales_lbv,buyerid,integer,4) (public,sales_lbv,eventid,integer,5) (public,sales_lbv,dateid,smallint,6) (public,sales_lbv,qtysold,smallint,7) (public,sales_lbv,pricepaid,"numeric(8,2)",8) (public,sales_lbv,commission,"numeric(8,2)",9) (public,sales_lbv,saletime,"timestamp without time zone",10) (public,event_lbv,eventid,integer,1) (public,event_lbv,venueid,smallint,2) (public,event_lbv,catid,smallint,3) (public,event_lbv,dateid,smallint,4) (public,event_lbv,eventname,"character varying(200)",5) (public,event_lbv,starttime,"timestamp without time zone",6)

下列範例以資料表格式傳回所有近期繫結檢視的欄中繼資料。

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 | sales_lbv | salesid | integer | 1 public | sales_lbv | listid | integer | 2 public | sales_lbv | sellerid | integer | 3 public | sales_lbv | buyerid | integer | 4 public | sales_lbv | eventid | integer | 5 public | sales_lbv | dateid | smallint | 6 public | sales_lbv | qtysold | smallint | 7 public | sales_lbv | pricepaid | numeric(8,2) | 8 public | sales_lbv | commission | numeric(8,2) | 9 public | sales_lbv | saletime | timestamp without time zone | 10 public | event_lbv | eventid | integer | 1 public | event_lbv | venueid | smallint | 2 public | event_lbv | catid | smallint | 3 public | event_lbv | dateid | smallint | 4 public | event_lbv | eventname | character varying(200) | 5 public | event_lbv | starttime | timestamp without time zone | 6