psycopg2.connect()
Function
This method creates a database session and returns a new connection object.
Prototype
conn=psycopg2.connect(dbname="test",user="postgres",password="secret",host="127.0.0.1",port="5432")
Parameter
Table 1 psycopg2.connect parameters
Path of the client certificate, which is used for SSL connection. | |
Path of the root certificate, which is used for SSL connection. |
Return Value
Connection object (for connecting to the openGauss DB instance)
Examples
For details, see Example: Common Operations.
Feedback