diff options
Diffstat (limited to 'doc/src/connection.rst')
-rw-r--r-- | doc/src/connection.rst | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/doc/src/connection.rst b/doc/src/connection.rst index 2910f30..bd192d6 100644 --- a/doc/src/connection.rst +++ b/doc/src/connection.rst @@ -198,7 +198,7 @@ The ``connection`` class .. seealso:: the |PREPARE TRANSACTION|_ PostgreSQL command. .. |PREPARE TRANSACTION| replace:: :sql:`PREPARE TRANSACTION` - .. _PREPARE TRANSACTION: http://www.postgresql.org/docs/current/static/sql-prepare-transaction.html + .. _PREPARE TRANSACTION: https://www.postgresql.org/docs/current/static/sql-prepare-transaction.html .. index:: @@ -224,7 +224,7 @@ The ``connection`` class .. seealso:: the |COMMIT PREPARED|_ PostgreSQL command. .. |COMMIT PREPARED| replace:: :sql:`COMMIT PREPARED` - .. _COMMIT PREPARED: http://www.postgresql.org/docs/current/static/sql-commit-prepared.html + .. _COMMIT PREPARED: https://www.postgresql.org/docs/current/static/sql-commit-prepared.html .. index:: @@ -246,7 +246,7 @@ The ``connection`` class .. seealso:: the |ROLLBACK PREPARED|_ PostgreSQL command. .. |ROLLBACK PREPARED| replace:: :sql:`ROLLBACK PREPARED` - .. _ROLLBACK PREPARED: http://www.postgresql.org/docs/current/static/sql-rollback-prepared.html + .. _ROLLBACK PREPARED: https://www.postgresql.org/docs/current/static/sql-rollback-prepared.html .. index:: @@ -267,7 +267,7 @@ The ``connection`` class transactions initiated by a program using such driver should be unpacked correctly. - .. __: http://jdbc.postgresql.org/ + .. __: https://jdbc.postgresql.org/ Xids returned by `!tpc_recover()` also have extra attributes `~psycopg2.extensions.Xid.prepared`, `~psycopg2.extensions.Xid.owner`, @@ -277,7 +277,7 @@ The ``connection`` class .. seealso:: the |pg_prepared_xacts|_ system view. .. |pg_prepared_xacts| replace:: `pg_prepared_xacts` - .. _pg_prepared_xacts: http://www.postgresql.org/docs/current/static/view-pg-prepared-xacts.html + .. _pg_prepared_xacts: https://www.postgresql.org/docs/current/static/view-pg-prepared-xacts.html @@ -309,7 +309,7 @@ The ``connection`` class |PQcancel|_. .. |PQcancel| replace:: `!PQcancel()` - .. _PQcancel: http://www.postgresql.org/docs/current/static/libpq-cancel.html#LIBPQ-PQCANCEL + .. _PQcancel: https://www.postgresql.org/docs/current/static/libpq-cancel.html#LIBPQ-PQCANCEL .. versionadded:: 2.3 @@ -325,10 +325,10 @@ The ``connection`` class available for recover. .. |RESET| replace:: :sql:`RESET` - .. _RESET: http://www.postgresql.org/docs/current/static/sql-reset.html + .. _RESET: https://www.postgresql.org/docs/current/static/sql-reset.html .. |SET SESSION AUTHORIZATION| replace:: :sql:`SET SESSION AUTHORIZATION` - .. __: http://www.postgresql.org/docs/current/static/sql-set-session-authorization.html + .. __: https://www.postgresql.org/docs/current/static/sql-set-session-authorization.html .. versionadded:: 2.0.12 @@ -366,7 +366,7 @@ The ``connection`` class `autocommit` attribute. .. _isolation level: - http://www.postgresql.org/docs/current/static/transaction-iso.html + https://www.postgresql.org/docs/current/static/transaction-iso.html Arguments set to `!None` (the default for all) will not be changed. The parameters *isolation_level*, *readonly* and *deferrable* also @@ -376,11 +376,11 @@ The ``connection`` class |default_transaction_read_only|__, |default_transaction_deferrable|__. .. |default_transaction_isolation| replace:: :sql:`default_transaction_isolation` - .. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-ISOLATION + .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-ISOLATION .. |default_transaction_read_only| replace:: :sql:`default_transaction_read_only` - .. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-READ-ONLY + .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-READ-ONLY .. |default_transaction_deferrable| replace:: :sql:`default_transaction_deferrable` - .. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-DEFERRABLE + .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-DEFERRABLE The function must be invoked with no transaction in progress. @@ -388,7 +388,7 @@ The ``connection`` class of the transaction parameters in the server. .. |SET TRANSACTION| replace:: :sql:`SET TRANSACTION` - .. _SET TRANSACTION: http://www.postgresql.org/docs/current/static/sql-set-transaction.html + .. _SET TRANSACTION: https://www.postgresql.org/docs/current/static/sql-set-transaction.html .. versionadded:: 2.4.2 @@ -534,7 +534,7 @@ The ``connection`` class is the encoding defined by the database. It should be one of the `characters set supported by PostgreSQL`__ - .. __: http://www.postgresql.org/docs/current/static/multibyte.html + .. __: https://www.postgresql.org/docs/current/static/multibyte.html .. index:: @@ -568,7 +568,7 @@ The ``connection`` class configuration parameters`__ such as ``log_statement``, ``client_min_messages``, ``log_min_duration_statement`` etc. - .. __: http://www.postgresql.org/docs/current/static/runtime-config-logging.html + .. __: https://www.postgresql.org/docs/current/static/runtime-config-logging.html .. attribute:: notifies @@ -600,6 +600,24 @@ The ``connection`` class .. index:: + pair: Backend; Host + + .. attribute:: host + + The server host name of the active connection. + + This can be a host name, an IP address, or a directory path if the + connection is via Unix socket. (The path case can be distinguished + because it will always be an absolute path, beginning with ``/``.) + + .. seealso:: libpq docs for `PQhost()`__ for details. + + .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQHOST + + .. versionadded:: 2.8.0 + + + .. index:: pair: Backend; PID .. method:: get_backend_pid() @@ -612,7 +630,7 @@ The ``connection`` class .. seealso:: libpq docs for `PQbackendPID()`__ for details. - .. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQBACKENDPID + .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQBACKENDPID .. versionadded:: 2.0.8 @@ -633,7 +651,7 @@ The ``connection`` class .. seealso:: libpq docs for `PQparameterStatus()`__ for details. - .. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPARAMETERSTATUS + .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPARAMETERSTATUS .. versionadded:: 2.0.12 @@ -656,7 +674,7 @@ The ``connection`` class .. seealso:: libpq docs for `PQconninfo()`__ for details. - .. __: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNINFO + .. __: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNINFO .. versionadded:: 2.7 @@ -673,7 +691,7 @@ The ``connection`` class .. seealso:: libpq docs for `PQtransactionStatus()`__ for details. - .. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQTRANSACTIONSTATUS + .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQTRANSACTIONSTATUS .. index:: @@ -688,7 +706,7 @@ The ``connection`` class .. seealso:: libpq docs for `PQprotocolVersion()`__ for details. - .. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPROTOCOLVERSION + .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPROTOCOLVERSION .. versionadded:: 2.0.12 @@ -706,7 +724,7 @@ The ``connection`` class .. seealso:: libpq docs for `PQserverVersion()`__ for details. - .. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQSERVERVERSION + .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQSERVERVERSION .. versionadded:: 2.0.12 @@ -743,7 +761,7 @@ The ``connection`` class `~psycopg2.extensions.lobject` to be instantiated. .. |lo_import| replace:: `!lo_import()` - .. _lo_import: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-IMPORT + .. _lo_import: https://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-IMPORT Available values for *mode* are: |