Name

postgis.gdal_enabled_drivers — PostGIS 환경에서 사용할 수 있는 GDAL 드라이버를 설정하는 설정 옵션입니다. GDAL 설정 변수 GDAL_SKIP에 영향을 미칩니다.

설명

PostGIS 환경에서 사용할 수 있는 GDAL 드라이버를 설정하는 설정 옵션입니다. GDAL 설정 변수 GDAL_SKIP에 영향을 미칩니다. PostgreSQL의 설정 파일 postgresql.conf 안에서 이 옵션을 설정할 수 있습니다. 또 연결이나 상호처리 단계에서도 설정할 수 있습니다.

PostgreSQL을 구동시키는 과정에서 사용할 수 있는 드라이버 목록과 함께 환경 변수 POSTGIS_GDAL_ENABLED_DRIVERS 를 패스(pass)시켜 postgis.gdal_enabled_drivers 의 초기값을 설정할 수도 있습니다.

드라이버의 축약명 또는 코드를 통해 활성화된 GDAL 특화 드라이버를 지정할 수 있습니다. 드라이버의 축약명 또는 코드는 GDAL 래스터 형식 에서 찾을 수 있습니다. 각 드라이버 사이에 공백을 삽입하면 복수의 드라이버를 지정할 수 있습니다.

[Note]

postgis.gdal_enabled_drivers 를 위해 사용할 수 있는 특별 코드가 세 개 있습니다. 이 코드들은 대소문자를 구분합니다.

  • DISABLE_ALL 은 모든 GDAL 드라이버를 비활성화시킵니다. DISABLE_ALL 이 있을 경우, postgis.gdal_enabled_drivers 안에 있는 다른 모든 값을 무시합니다.

  • ENABLE_ALL 은 모든 GDAL 드라이버를 활성화시킵니다.

  • VSICURL 은 GDAL의 /vsicurl/ 가상 파일 시스템을 활성화시킵니다.

postgis.gdal_enabled_drivers 가 DISABLE_ALL로 성정됐을 경우, DB 외부 래스터, ST_FromGDALRaster(), ST_AsGDALRaster(), ST_AsTIFF(), ST_AsJPEG() 그리고 ST_AsPNG()를 사용하려 한다면 모두 오류 메시지를 보게 될 것입니다.

[Note]

표준 PostGIS 설치시, postgis.gdal_enabled_drivers 는 DISABLE_ALL로 설정됩니다.

[Note]

GDAL_SKIP에 대한 추가 정보는 GDAL의 Configuration Options 에서 찾아볼 수 있습니다.

2.2.0 버전부터 사용할 수 있습니다.

예시

Set and reset postgis.gdal_enabled_drivers for the current session.

SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';
SET postgis.gdal_enabled_drivers = default;
                

Set specific drivers for all new connections to a database.

ALTER DATABASE mygisdb SET postgis.gdal_enabled_drivers TO 'GTiff PNG JPEG';

Set the default for the whole database cluster to enable all drivers. This requires superuser access. Also note that database, session, and user settings override this.

This example writes the setting to postgres.auto.conf.

ALTER SYSTEM SET postgis.gdal_enabled_drivers TO 'ENABLE_ALL';

Reload the PostgreSQL configuration so the changed setting is applied.

SELECT pg_reload_conf();