Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

2.1 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "/* service='personhog-identity', operation='resolve_persons' */ \n        SELECT k.team_id AS \"key_team_id!\", k.distinct_id AS \"key_distinct_id!\",\n               p.id, p.uuid, p.team_id::bigint AS \"team_id!\", p.created_at, p.version,\n               p.is_identified,\n               CASE WHEN p.is_user_id IS NULL THEN NULL ELSE (p.is_user_id != 0) END AS is_user_id,\n               p.last_seen_at\n        FROM unnest($1::int[], $2::text[]) AS k(team_id, distinct_id)\n        JOIN posthog_persondistinctid pdi\n          ON pdi.team_id = k.team_id AND pdi.distinct_id = k.distinct_id\n         AND pdi.is_deleted = false\n        JOIN posthog_person p\n          ON p.team_id = pdi.team_id AND p.id = pdi.person_id\n         AND p.team_id = ANY($1::int[])\n         AND p.is_deleted = false\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "key_team_id!",
        "type_info": "Int4"
      },
      {
        "ordinal": 1,
        "name": "key_distinct_id!",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "id",
        "type_info": "Int8"
      },
      {
        "ordinal": 3,
        "name": "uuid",
        "type_info": "Uuid"
      },
      {
        "ordinal": 4,
        "name": "team_id!",
        "type_info": "Int8"
      },
      {
        "ordinal": 5,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 6,
        "name": "version",
        "type_info": "Int8"
      },
      {
        "ordinal": 7,
        "name": "is_identified",
        "type_info": "Bool"
      },
      {
        "ordinal": 8,
        "name": "is_user_id",
        "type_info": "Bool"
      },
      {
        "ordinal": 9,
        "name": "last_seen_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Int4Array",
        "TextArray"
      ]
    },
    "nullable": [
      null,
      null,
      false,
      false,
      null,
      false,
      true,
      false,
      null,
      true
    ]
  },
  "hash": "a8babd1df479f0d2cf62c5f3a77460cbe4c741182b7d74103f57bad7275dd09c"
}