All thing of the world!

Postgresql has_type_privilege 설명 : 포스트그레스큐엘 함수 본문

IT/Postgresql DBMS

Postgresql has_type_privilege 설명 : 포스트그레스큐엘 함수

WorldSeeker 2021. 5. 5. 14:47

1. 함수의 목적

   

    Postgresql has_type_privilege 함수는 pg 시스템 핸들링 함수로서, 인수로 지정한 데이베이스에 특정 권한이 존재하는지 체크하여 존재하면 true, 존재하지 않으면 false를 반환한다.

 

2. 샘플을 통한 개념 퀵뷰

 

    SELECT has_type_privilege ('dtype1', 'usage'); 

 

    has_type_privilege 

    ------------

    true

 

 

3. 사용방법

 

    has_type_privilege ( [ user name or oid, ] type text or oid, privilege text )

        

 

4. 함수 PARAMETER 설명

 

[user name or oid] - 선택적 인수

권한 존재여부를 검사할 계정명이나 OID를 입력한다. 기본값은 현재 세션에 접속한 계정명.

 

[type text or oid]

권한 존재여부를 검사할 생성한 타입명이나 OID를 입력한다. 

 

[privilege text]

USAGE를 입력한다.

 

5. 다양한 샘플 표현

 

 

 

 Posgresql 내장함수 모음 : atotw.tistory.com/category/IT/Postgresql%20DBMS

 

Comments