{
  "name": "postgres-query",
  "title": "Run a PostgreSQL query",
  "description": "Run a SQL query against a PostgreSQL database with psql, using a password read from a Kubernetes Secret.",
  "category": "Databases",
  "tags": [
    "databases",
    "postgres"
  ],
  "latestVersion": "1.0.0",
  "versions": [
    "1.0.0"
  ],
  "parameters": [
    "database",
    "host",
    "query",
    "user",
    "password-secret-key",
    "password-secret-name",
    "port"
  ],
  "images": [
    "postgres@sha256:8b0ff4cdf221f0c53d7fcda681d3b461be725c492cd881c5ec9c0ad25023f188"
  ],
  "url": "https://catalog.dagweave.com/api/v1/items/postgres-query.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/postgres-query/latest/template.yaml",
  "page": "https://catalog.dagweave.com/items/postgres-query/",
  "entrypoint": "query",
  "parameterDetails": [
    {
      "name": "database",
      "title": "Database",
      "description": "Database name to connect to.",
      "type": "string",
      "required": true
    },
    {
      "name": "host",
      "title": "Host",
      "description": "PostgreSQL server host.",
      "type": "string",
      "required": true,
      "example": "db.internal"
    },
    {
      "name": "query",
      "title": "SQL query",
      "description": "The SQL query to run.",
      "type": "string",
      "required": true,
      "example": "SELECT count(*) FROM orders;"
    },
    {
      "name": "user",
      "title": "User",
      "description": "User to authenticate as.",
      "type": "string",
      "required": true
    },
    {
      "name": "password-secret-key",
      "title": "Password secret key",
      "description": "Key within the Secret that holds the password.",
      "type": "string",
      "required": false,
      "default": "password"
    },
    {
      "name": "password-secret-name",
      "title": "Password secret name",
      "description": "Name of the Kubernetes Secret holding the user's password.",
      "type": "string",
      "required": false,
      "default": "postgres-password"
    },
    {
      "name": "port",
      "title": "Port",
      "description": "PostgreSQL server port.",
      "type": "string",
      "required": false,
      "default": "5432"
    }
  ],
  "imageDetails": [
    {
      "ref": "postgres@sha256:8b0ff4cdf221f0c53d7fcda681d3b461be725c492cd881c5ec9c0ad25023f188",
      "repository": "postgres",
      "tag": "19-alpine",
      "digest": "sha256:8b0ff4cdf221f0c53d7fcda681d3b461be725c492cd881c5ec9c0ad25023f188"
    }
  ],
  "versionDetails": [
    {
      "version": "1.0.0",
      "date": "2026-07-17",
      "notes": "Initial release.",
      "latest": true,
      "installable": true,
      "url": "https://catalog.dagweave.com/api/v1/items/postgres-query/1.0.0.json",
      "templateUrl": "https://catalog.dagweave.com/api/v1/items/postgres-query/1.0.0/template.yaml"
    }
  ],
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/postgres-query",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
