Snowflake Postgres에 연결하기

Once you create a Snowflake Postgres instance, you can connect to it with any PostgreSQL client, such as psql or DBeaver. To establish a connection, you configure your client with:

  • 인스턴스의 호스트 이름. 이는 가상 머신 호스트의 URL입니다.

  • A username. When you create an instance, the snowflake_admin user is created by default and designed for administrative access.

  • 연결할 Postgres 데이터베이스. 이 매개 변수는 Postgres 연결을 생성하는 데 필요합니다. 기본 데이터베이스의 이름은 ‘postgres’입니다.

  • 사용자의 비밀번호.

Here is an example of these connections details used with the psql command line client:

$ psql -h abcefg.snowflake.app  -U snowflake_admin -d postgres
Copy

(psql will prompt for a password.)

포트를 지정해야 하는 경우 5432를 사용합니다.

$ psql -h abcefg.snowflake.app  -U snowflake_admin -p 5432 -d postgres
Copy

중요

Snowflake Postgres 인스턴스에 연결하려면 SSL이 필요합니다.

연결 문자열 정보

Snowsight를 통해 Postgres 인스턴스를 생성할 때 Snowflake Postgres는 `libpq URI 형식<https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING>`_의 연결 문자열을 제공하여 ``psql``을 통해 직접 연결하거나 애플리케이션 구성에 입력하여 연결합니다.

참고

지정된 역할에 대한 액세스 권한을 명시적으로 재설정하지 않는 한, 클러스터의 연결 문자열은 클러스터 관리 작업 전체에서 동일하게 유지됩니다.

데이터베이스 URL로서의 연결 문자열에는 다음 매개 변수가 포함됩니다.

  • 프로토콜: postgres://

  • 사용자 이름: 자세한 내용은 Snowflake Postgres 역할 섹션을 참조하세요.

  • 비밀번호

  • 호스트 이름

  • 포트: 5432

  • database_name: 기본값은 postgres임

그런 다음 이를 사용하여 해당 형식의 URI 연결 문자열을 빌드합니다.

postgresql://<username>:<password>@hostname:<port>/<database_name>
Copy

클라이언트 환경이 SSL을 적용하도록 구성되지 않은 경우 :codenowrap:`?sslmode=require`를 URI에 추가할 수 있습니다.

postgresql://<username>:<password>@hostname:<port>/<database_name>?sslmode=require
Copy