)]}'
{
  "commit": "9960e9c6034ed301b90e6e6777c80b7c95b45cf0",
  "tree": "d1c1e0c89bd8112dbe839328cd2f935ffde722d4",
  "parents": [
    "01ee9414f9b483782cbf50cfe0744860bcf375ae"
  ],
  "author": {
    "name": "Greg Felice",
    "email": "gregfelice@gmail.com",
    "time": "Wed May 13 20:02:14 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed May 13 17:02:14 2026 -0700"
  },
  "message": "Add agtype \u003c-\u003e jsonb bidirectional casts (#350) (#2361)\n\n* Add agtype \u003c-\u003e jsonb bidirectional casts (issue #350)\n\nRegister explicit casts between agtype and jsonb, enabling:\n\n  SELECT properties(n)::jsonb FROM cypher(...) AS (n agtype);\n  SELECT \u0027{\"key\": \"value\"}\u0027::jsonb::agtype;\n\n  -- Use jsonb operators on graph data:\n  SELECT (props::jsonb)-\u003e\u003e\u0027name\u0027 FROM cypher(...) AS (props agtype);\n\nImplementation uses SQL language functions that go through proven\ntext-intermediate paths:\n  agtype -\u003e jsonb:  agtype_to_json() -\u003e json::jsonb\n  jsonb -\u003e agtype:  jsonb::text -\u003e text::agtype\n\nThis approach is safe because agtype extends jsonb\u0027s binary format\nwith types (AGTV_INTEGER, AGTV_FLOAT, AGTV_VERTEX, AGTV_EDGE,\nAGTV_PATH) that jsonb does not recognize, making direct binary\nconversion unreliable.  The text roundtrip handles all value types\ncorrectly including graph types (vertex/edge properties are\nextracted as JSON objects).\n\nAll 31 regression tests pass.\n\nCo-Authored-By: Claude Opus 4.6 (1M context) \u003cnoreply@anthropic.com\u003e\n\n* Address Copilot review: fix comment, add regression tests for jsonb casts\n\n- Fix comment in agtype_coercions.sql: document json-intermediate path\n  (agtype_to_json -\u003e json::jsonb) instead of incorrect \"text intermediate\"\n- Add agtype_jsonb_cast regression test covering: string/null/array/object\n  agtype-\u003ejsonb, all jsonb scalar types-\u003eagtype, roundtrips, vertex/edge\n  -\u003ejsonb with structural key checks, NULL handling\n- Register agtype_jsonb_cast in Makefile REGRESS list\n\nCo-Authored-By: Claude Opus 4.6 (1M context) \u003cnoreply@anthropic.com\u003e\n\n* Register agtype \u003c-\u003e jsonb casts in upgrade template\n\nThe age_upgrade regression test (added after this PR was originally\nopened) verifies that every SQL object in the install SQL also appears\nin the version upgrade template (age--\u003cINIT\u003e--\u003cCURR\u003e.sql).  Surfaced\nduring rebase onto current master: agtype_to_jsonb / jsonb_to_agtype\nand their casts were missing from the template, causing 4 entries in\nthe \"missing_function\" / \"missing_cast\" check.\n\nAdds the two functions and two casts to the end of the template,\nfollowing the file\u0027s own \"add all additions to the end of this file\"\nconvention.  Cassert installcheck now 34/34 AGE tests green (pgvector\nskipped — env-only).\n\n---------\n\nCo-authored-by: Claude Opus 4.6 (1M context) \u003cnoreply@anthropic.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3c5a28c2957e3bf291fe49935ae45e090ff727fb",
      "old_mode": 33188,
      "old_path": "Makefile",
      "new_id": "7e5fb3d2dbcedb7072edde77211013bc3fa7cfdf",
      "new_mode": 33188,
      "new_path": "Makefile"
    },
    {
      "type": "modify",
      "old_id": "a3cdea279cf45c408ea68afebd3d5e6615871f6e",
      "old_mode": 33188,
      "old_path": "age--1.7.0--y.y.y.sql",
      "new_id": "5204477703721fb7d573d877f850bda3ced600fb",
      "new_mode": 33188,
      "new_path": "age--1.7.0--y.y.y.sql"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "49bf1f887ff12ea8ad91dade47d90f096a24729e",
      "new_mode": 33188,
      "new_path": "regress/expected/agtype_jsonb_cast.out"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c3a6a8e2700401753c01da7e3707e8ff7a09037f",
      "new_mode": 33188,
      "new_path": "regress/sql/agtype_jsonb_cast.sql"
    },
    {
      "type": "modify",
      "old_id": "933375fc1af60c962d42d661d92e1269d1e19d95",
      "old_mode": 33188,
      "old_path": "sql/agtype_coercions.sql",
      "new_id": "7763360f2681330e77410fd98b417d91049a33df",
      "new_mode": 33188,
      "new_path": "sql/agtype_coercions.sql"
    }
  ]
}
