connection

来自「PostgreSQL7.4.6 for Linux」· 代码 · 共 76 行

TXT
76
字号
==================================================================Namedblink_connect -- Opens a persistent connection to a remote databaseSynopsisdblink_connect(text connstr)dblink_connect(text connname, text connstr)Inputs  connname    if 2 arguments are given, the first is used as a name for a persistent    connection  connstr    standard libpq format connection string,     e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"    if only one argument is given, the connection is unnamed; only one unnamed    connection can exist at a timeOutputs  Returns status = "OK"Example usageselect dblink_connect('dbname=template1'); dblink_connect---------------- OK(1 row)select dblink_connect('myconn','dbname=template1'); dblink_connect---------------- OK(1 row)==================================================================Namedblink_disconnect -- Closes a persistent connection to a remote databaseSynopsisdblink_disconnect()dblink_disconnect(text connname)Inputs  connname    if an argument is given, it is used as a name for a persistent    connection to close; otherwiase the unnamed connection is closedOutputs  Returns status = "OK"Example usagetest=# select dblink_disconnect(); dblink_disconnect------------------- OK(1 row)select dblink_disconnect('myconn'); dblink_disconnect------------------- OK(1 row)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?