# Postgres

> Tag 4: the client opens its half of a database connection the server announced, quoting the connection id; the server sends everything the container’s driver wrote, and the channel response finish when the driver’s socket ends.

Canonical: https://provider.diverge.network/2.3.0/endpoints/containers-agents-run/client/postgres/
Specification revision: 2.3.0

The client opens this channel as its half of a database connection
the server announced on a [postgres](/2.3.0/endpoints/containers-agents-run/server/postgres/)
channel of its own, quoting the connection id. The server sends on
it everything the container's driver writes.

- **The request.** The tag byte `4` followed by the connection id,
  four bytes. [Request](/2.3.0/endpoints/containers-agents-run/client/postgres/request/) states
  its form.
- **The response.** The bytes the driver wrote, as channel responses,
  and the channel response finish when the driver's socket ends.
  [Response](/2.3.0/endpoints/containers-agents-run/client/postgres/response/) states the
  sequence.
- **Nothing is lost.** The server holds what the driver wrote from
  the moment it announced the connection, and sends it first, in
  order, when this channel opens.
- **One half per connection.** A connection id the server did not
  announce, and an id whose half was already opened, are answered by
  a channel response finish that no channel response precedes.
