PG_GET_LATE_BINDING_VIEW_COLS
데이터베이스에 있는 모든 Late Binding 보기에 대한 열 메타데이터를 반환합니다. 자세한 내용은 Late Binding 보기 섹션을 참조하세요.
구문
pg_get_late_binding_view_cols()
반환 타입
VARCHAR
사용 노트
PG_GET_LATE_BINDING_VIEW_COLS
함수는 Late Binding 보기에 있는 각 열에 대해 하나의 행을 반환합니다. 행에는 스키마 이름, 관계 이름, 열 이름, 데이터 형식 및 열 번호가 있는 쉼표로 분리된 목록이 포함되어 있습니다.
예제
다음 예는 모든 Late Binding 보기에 대한 열 메타데이터를 반환합니다.
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)
다음 예는 테이블 형식의 모든 Late Binding 보기에 대한 열 메타데이터를 반환합니다.
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