IT/Postgresql DBMS
Postgresql parse_ident 설명 : 포스트그레스큐엘 함수
WorldSeeker
2021. 4. 19. 11:04
1. 함수의 목적
Postgresql parse_ident 함수는 식별자를 배열로 분해하여 ""부호를 제거한 문자열 배열을 반환한다.
2. 샘플을 통한 개념 퀵뷰
SELECT parse_ident('"SomeSchema".someTable');
parse_ident
----------------------
{SomeSchema,sometable}
3. 사용방법
parse_ident ( qualified_identifier text [, strict_mode boolean DEFAULT true ] )
4. 함수 PARAMETER 설명
[qualified_identifier text]
배열로 분해할 식별자를 입력한다.
[, strict_mode boolean DEFAULT true ]
식별자 부호 ""뒤에 문자열을 무시하려면 flase, 무시하지 않으려면 true, 지정하지 않은면 기본은 true
5. 다양한 샘플 표현
1) strict_mode를 false로 지정
SELECT parse_ident('"SomeSchema"d.someTable',false);
2) 식별자 뒤에 문자가 붙었음에도 불구하고 strict_mode를 true로 설정하면 error
SELECT parse_ident('"SomeSchema"d.someTable',true);
▶▶ Posgresql 내장함수 모음 : atotw.tistory.com/category/IT/Postgresql%20DBMS