postgresql 시스템 테이블 제외

· 개-발/SQL
postgresql bash 로 접속후 로그인 까지 완료 해준다. docker exec -it 도커네임 psql -U postgres -W postgres postgres select * from pg_tables; 일반적으로 이렇게 조회를 생각했었는데 이러면 시스템 테이블까지 조회가 됏었다. 생성된 테이블만 조회를 하려면 데이터테이블을 제외 해주고 조회를 한다. SELECT schemaname, tablename FROM pg_catalog.pg_tables WHERE schemaname != 'pg_catalog' AND schemaname != 'information_schema';
imSoo
'postgresql 시스템 테이블 제외' 태그의 글 목록