docs: def from_url(cls, url):
          """
          Construct a PostgresConfig from a URL.
          """
          parsed = urlparse(url)
          return cls(
              username=parsed.username,
              password=parsed.password,
              hostname=parsed.hostname,
              port=parsed.port,
              database=parsed.path.lstrip('/'),
              # Like parse_qs, but produces a scalar per key, instead of a list:
              query_params=dict(param.split('=')
                                for param in parsed.query.split('&'))
              if parsed.query else {},
          )