LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph.store.postgresbasePostgresStorefrom_conn_string
    Method●Since v1.0

    from_conn_string

    Create a new PostgresStore instance from a connection string.

    Copy
    from_conn_string(
      cls,
      conn_string: str,
      *,
      pipeline: bool = False,
      pool_config: PoolConfig | None = None,
      index: PostgresIndexConfig | None = None,
      ttl: TTLConfig | None = None
    ) -> Iterator[PostgresStore]

    Parameters

    NameTypeDescription
    conn_string*str

    The Postgres connection info string.

    pipelinebool
    Default:False

    whether to use Pipeline

    pool_configPoolConfig | None
    Default:None

    Configuration for the connection pool. If provided, will create a connection pool and use it instead of a single connection. This overrides the pipeline argument.

    indexPostgresIndexConfig | None
    Default:None

    The index configuration for the store.

    ttlTTLConfig | None
    Default:None

    The TTL configuration for the store.

    View source on GitHub