Connection string for PostgreSQL

Source: Internet
Author: User
Tags connection pooling ssl connection

Http://www.mono-project.com/PostgreSQL#Some_Connection_Example

Parameter Definition Description Example
Server Hostname of the PostgreSQL Server Server = localhost
Database Name of the database Database = Postgres
Port Network port to connect. Optional Port = 54321
User ID User ID User ID = s
Password Password Password = mypass12
Encoding Encoding to be used. Possible values: ASCII (default) and Unicode. use Unicode if you are getting problems with UTF-8 values Encoding = Unicode
SSL True or false. Controls whether to attempt a secure connection. Default = false SSL = true
Pooling True or false. Controls whether Connection pooling is used. Default = true Pooling = false
Minpoolsize Min size of connection pool. Default: 1 Minpoolsize = 2
Maxpoolsize Max size of connection pool. Default: 20 Maxpoolsize = 6
Timeout Time to wait for connection open in seconds Timeout = 30
Sslmode Mode for SSL connection control. sslmode can be one of the following values:

Prefer-if it is possible to connect using SSL, it will be used. require-if an SSL connection cannot be made, an exception is thrown. allow-not supported yet, just connects without SSL. disable-No SSL connection is done. default is disable.
Sslmode = require
Protocol Protocol version to use, instead of automatic detection. First tries 3 and fallsback to 2; integer 2 or 3. Protocol = 2

Commandtimeout = 20; timeout = 15;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.