도커 컨테이너에 있는 Postgresql 데이터베이스에 접근해서 psql로 계층형 쿼리 조회하고 그 결과를 csv 파일로 저장해서 로컬로 가져오기 계층형 쿼리 상품 p 가 있고, 아이디는 product_id, 상위 product는 parent_product_id 라고 할 때, 아래와 같이 계층형 쿼리를 작성 할 수 있습니다. with recursive search_product(product_id) as ( select p.* from product p where product_id =21306 union all select p.* from product p, search_product sp where k.parent_product_id = sp.product_id ) select * from searc..
Postgres) 계층형 쿼리작성 및 csv로 결과 저장하기