> For the complete documentation index, see [llms.txt](https://docs.flowiseai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowiseai.com/espanol/documentacion-oficial/integraciones/langchain/vector-stores/postgres.md).

# Postgres

<figure><img src="/files/OARRN7F8M9HfjQtVjCYI" alt="" width="292"><figcaption><p>Nodo Postgres</p></figcaption></figure>

Hay múltiples métodos para conectarse a Postgres según cómo esté configurada tu instancia. A continuación se muestra un ejemplo de una configuración local usando una imagen Docker precompilada proporcionada por el equipo de pgvector.

Crea un archivo llamado `docker-compose.yml` con el siguiente contenido:

```yaml
# Ejecuta este comando para iniciar la base de datos:
# docker-compose up --build
version: "3"
services:
  db:
    hostname: 127.0.0.1
    image: pgvector/pgvector:pg16
    ports:
      - 5432:5432
    restart: always
    environment:
      - POSTGRES_DB=api
      - POSTGRES_USER=myuser
      - POSTGRES_PASSWORD=ChangeMe
    volumes:
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
```

Usa `docker compose up` para iniciar el contenedor de Postgres.

Crea una nueva credencial con el usuario y contraseña configurados:

<figure><img src="/files/5UCVISOsA2KKtsA7N9ZL" alt="" width="526"><figcaption></figcaption></figure>

Completa los campos del nodo con los valores configurados en `docker-compose.yml`. Por ejemplo:

* Host: **localhost**
* Database: **api**
* Port: **5432**

¡Voilà! Ahora has configurado exitosamente Postgres Vector listo para ser usado.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flowiseai.com/espanol/documentacion-oficial/integraciones/langchain/vector-stores/postgres.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
