umf-access 0.1.0.dev8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. umf_access/__init__.py +109 -0
  2. umf_access/adoption.py +41 -0
  3. umf_access/build/__init__.py +2 -0
  4. umf_access/build/approximate.py +34 -0
  5. umf_access/build/catalog.py +1626 -0
  6. umf_access/build/commands.py +394 -0
  7. umf_access/build/pg_privileges.py +1544 -0
  8. umf_access/build/privileges.py +134 -0
  9. umf_access/build/search.py +365 -0
  10. umf_access/build/unity_search.py +104 -0
  11. umf_access/bulk.py +227 -0
  12. umf_access/canonical.py +23 -0
  13. umf_access/capture.py +410 -0
  14. umf_access/catalog.py +325 -0
  15. umf_access/codec_support.py +427 -0
  16. umf_access/commands.py +93 -0
  17. umf_access/delta_read.py +758 -0
  18. umf_access/dsl/__init__.py +148 -0
  19. umf_access/dsl/_context.py +36 -0
  20. umf_access/dsl/_expressions.py +625 -0
  21. umf_access/dsl/_joined.py +4 -0
  22. umf_access/dsl/_nodes.py +207 -0
  23. umf_access/dsl/_query.py +5559 -0
  24. umf_access/dsl/_selection.py +143 -0
  25. umf_access/dsl/navigation.py +302 -0
  26. umf_access/dsl/render.py +516 -0
  27. umf_access/dsl/search.py +343 -0
  28. umf_access/engine_catalog.py +563 -0
  29. umf_access/generated_core.py +5 -0
  30. umf_access/lifecycle/__init__.py +46 -0
  31. umf_access/lifecycle/_darwin_process_observer.c +306 -0
  32. umf_access/lifecycle/approval.py +366 -0
  33. umf_access/lifecycle/backfills.py +79 -0
  34. umf_access/lifecycle/catalog.py +289 -0
  35. umf_access/lifecycle/cli.py +231 -0
  36. umf_access/lifecycle/concurrent.py +196 -0
  37. umf_access/lifecycle/conversion_policy.py +188 -0
  38. umf_access/lifecycle/correspondence.py +203 -0
  39. umf_access/lifecycle/generation_authority_bootstrap.py +1491 -0
  40. umf_access/lifecycle/generation_authority_session.py +125 -0
  41. umf_access/lifecycle/generation_enrollment_authority.py +1108 -0
  42. umf_access/lifecycle/generation_enrollment_ledger.py +698 -0
  43. umf_access/lifecycle/generation_ingress.py +185 -0
  44. umf_access/lifecycle/generation_root_registry.py +138 -0
  45. umf_access/lifecycle/head.py +250 -0
  46. umf_access/lifecycle/head_view.py +81 -0
  47. umf_access/lifecycle/host.py +1183 -0
  48. umf_access/lifecycle/ingress_custody.py +750 -0
  49. umf_access/lifecycle/ingress_local_postgres.py +7990 -0
  50. umf_access/lifecycle/ingress_store.py +1488 -0
  51. umf_access/lifecycle/ledger.py +276 -0
  52. umf_access/lifecycle/ledger_schema.py +116 -0
  53. umf_access/lifecycle/mixed.py +593 -0
  54. umf_access/lifecycle/outcome_schema.py +136 -0
  55. umf_access/lifecycle/owner_approval_core.py +1810 -0
  56. umf_access/lifecycle/owner_authority.py +472 -0
  57. umf_access/lifecycle/owner_bootstrap.py +2077 -0
  58. umf_access/lifecycle/owner_wire.py +161 -0
  59. umf_access/lifecycle/phase_fence.py +52 -0
  60. umf_access/lifecycle/phase_policy.py +422 -0
  61. umf_access/lifecycle/privileges.py +145 -0
  62. umf_access/lifecycle/probe.py +39 -0
  63. umf_access/lifecycle/progress.py +497 -0
  64. umf_access/lifecycle/roles.py +96 -0
  65. umf_access/lifecycle/row_originals.py +1712 -0
  66. umf_access/lifecycle/row_originals_creation.py +759 -0
  67. umf_access/lifecycle/row_originals_receipt.py +413 -0
  68. umf_access/lifecycle/seeds.py +99 -0
  69. umf_access/lifecycle/sql_containment.py +358 -0
  70. umf_access/lifecycle/sql_containment_cli.py +33 -0
  71. umf_access/lifecycle/sql_containment_parser.py +20 -0
  72. umf_access/lifecycle/supervisor_journal_codec.py +1251 -0
  73. umf_access/lifecycle/table_boundary.py +22 -0
  74. umf_access/lifecycle/target_custody_codec.py +788 -0
  75. umf_access/lifecycle/witness.py +72 -0
  76. umf_access/managed_actions.py +271 -0
  77. umf_access/managed_bulk.py +353 -0
  78. umf_access/managed_delta.py +150 -0
  79. umf_access/managed_support.py +166 -0
  80. umf_access/manifest_commands.py +278 -0
  81. umf_access/native_actions.py +1007 -0
  82. umf_access/native_program.py +570 -0
  83. umf_access/pages.py +125 -0
  84. umf_access/postgres_bulk.py +509 -0
  85. umf_access/postgres_read.py +1230 -0
  86. umf_access/postgres_search.py +639 -0
  87. umf_access/protocols.py +665 -0
  88. umf_access/py.typed +0 -0
  89. umf_access/related_keys.py +233 -0
  90. umf_access/reviewed.py +706 -0
  91. umf_access/search_catalog.py +122 -0
  92. umf_access/targets.py +312 -0
  93. umf_access/types.py +220 -0
  94. umf_access/unified/__init__.py +187 -0
  95. umf_access/unified/_binding.py +654 -0
  96. umf_access/unified/head_session.py +144 -0
  97. umf_access/unified/native_binding.py +143 -0
  98. umf_access/unified/operation_values.py +173 -0
  99. umf_access/unified/outcome_values.py +76 -0
  100. umf_access/unified/session_async.py +161 -0
  101. umf_access/unified/session_binding.py +108 -0
  102. umf_access/unified/session_policy.py +152 -0
  103. umf_access/unified/session_psycopg2.py +70 -0
  104. umf_access/unified/session_sqlalchemy.py +161 -0
  105. umf_access/unified/session_sync.py +148 -0
  106. umf_access/unified/table_reads.py +314 -0
  107. umf_access/unified/table_writes.py +193 -0
  108. umf_access/unity_search.py +312 -0
  109. umf_access/values.py +280 -0
  110. umf_access/verification.py +64 -0
  111. umf_access-0.1.0.dev8.dist-info/METADATA +15 -0
  112. umf_access-0.1.0.dev8.dist-info/RECORD +117 -0
  113. umf_access-0.1.0.dev8.dist-info/WHEEL +4 -0
  114. umf_access-0.1.0.dev8.dist-info/entry_points.txt +4 -0
  115. umf_access-0.1.0.dev8.dist-info/licenses/LICENSE-APACHE +201 -0
  116. umf_access-0.1.0.dev8.dist-info/licenses/LICENSE-MIT +21 -0
  117. umf_access-0.1.0.dev8.dist-info/licenses/LICENSE.md +239 -0
@@ -0,0 +1,1544 @@
1
+ # SPDX-License-Identifier: MIT OR Apache-2.0
2
+ """Review-only, source-gated PG18.6 fixed read-runtime privilege evidence.
3
+
4
+ This module neither connects to PostgreSQL nor applies grant statements.
5
+ Compiler programs and other target/version profiles retain independent custody.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import ast
11
+ import hashlib
12
+ import json
13
+ from pathlib import Path
14
+ from typing import Any
15
+
16
+ from ..reviewed import catalog_fence
17
+
18
+ # Derived from the retained native resolver/revocation packet, never a host flag.
19
+ _EVIDENCE: dict[str, Any] = json.loads(r"""{
20
+ "version": "umf.sdk-pg-runtime-advisory/0.1",
21
+ "evidence": {
22
+ "packet": "docs/helix/04-build/evidence/typed-persistence/postgres-runtime-privilege-native-r13-20261017",
23
+ "inventorySha256": "2e906e3e0ebdff3ae609045622f688338766c5b6df62e2eb3b9fd610cb738eca",
24
+ "sdkSourceCommit": "a623b1fb553b1816f47cdd335d4c90b12b456acb",
25
+ "sdkWheelSha256": "ce2943e7e8a838103888198b26c5dae07e9afe94b6eb66906642737271086705",
26
+ "testedRuntimeSourceSha256": "1d32b92015cfb3eacf5f2caa08f152a60d1c6bc99508895f4da856642ba76010",
27
+ "serverVersion": 180006,
28
+ "python": "3.14.8",
29
+ "psycopg": "3.3.6",
30
+ "libpqVersion": 180006,
31
+ "weftWheelSha256": "d1d1e3831f3490e0cce90bc6404834982df9ab1e4f15a72f6cc81eca6d191f7e",
32
+ "actualFixedSelectVariants": 16,
33
+ "functionRevokeControls": 163,
34
+ "metadataRelationControls": 14
35
+ },
36
+ "fixedSql": {
37
+ "_ROLE": {
38
+ "sha256": "2e5f6cbb0fbdd9a25756cf2427fafd55c2578c1e03499a6d287d0981d5aa9fe6",
39
+ "sourceLines": [
40
+ 89
41
+ ]
42
+ },
43
+ "_TABLE": {
44
+ "sha256": "2c0f17ae15c2fba1c085d832dbffd8300e93fda505f38db36e70c1fe47eeb0d7",
45
+ "sourceLines": [
46
+ 91
47
+ ]
48
+ },
49
+ "_COLUMNS": {
50
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
51
+ "sourceLines": [
52
+ 97
53
+ ]
54
+ },
55
+ "_KEYS": {
56
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
57
+ "sourceLines": [
58
+ 103
59
+ ]
60
+ },
61
+ "_SHAPE": {
62
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
63
+ "sourceLines": [
64
+ 137
65
+ ]
66
+ },
67
+ "_RESOLUTION": {
68
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
69
+ "sourceLines": [
70
+ 185
71
+ ]
72
+ },
73
+ "inline-a24f29197f6a": {
74
+ "sha256": "a24f29197f6a349ae81e10693b97a062195fa5027ed2976e3758fb2e03392849",
75
+ "sourceLines": [
76
+ 75,
77
+ 800
78
+ ]
79
+ },
80
+ "inline-6f0a092bfd47": {
81
+ "sha256": "6f0a092bfd47e34756c8981defc3c5eb684025a0c60dfbe4ac5d3d6fb894c068",
82
+ "sourceLines": [
83
+ 618
84
+ ]
85
+ },
86
+ "inline-365ce44eecfd": {
87
+ "sha256": "365ce44eecfd313c769f71d7aeba48e43087273d4c1cb2d263b259b976d96241",
88
+ "sourceLines": [
89
+ 496
90
+ ]
91
+ },
92
+ "inline-79424d69b495": {
93
+ "sha256": "79424d69b495c9e84fbf10c55e320e5ba12278a37887509b1515009832186e9e",
94
+ "sourceLines": [
95
+ 614
96
+ ]
97
+ },
98
+ "inline-2af4424f8a1d": {
99
+ "sha256": "2af4424f8a1dfa5f936e67d66123d29dbe99ae91a322dfeecc0b63ce818a8657",
100
+ "sourceLines": [
101
+ 1086,
102
+ 957,
103
+ 766,
104
+ 853
105
+ ]
106
+ },
107
+ "inline-6c20e5345ee8": {
108
+ "sha256": "6c20e5345ee8028f61cc0541aeb60699e5cffa99c8f79ff7f8c62b0a8dad1837",
109
+ "sourceLines": [
110
+ 766,
111
+ 853
112
+ ]
113
+ }
114
+ },
115
+ "runtimeFunctions": [
116
+ {
117
+ "schema": "pg_catalog",
118
+ "name": "nameeq",
119
+ "arguments": [
120
+ {
121
+ "schema": "pg_catalog",
122
+ "name": "name"
123
+ },
124
+ {
125
+ "schema": "pg_catalog",
126
+ "name": "name"
127
+ }
128
+ ],
129
+ "result": {
130
+ "schema": "pg_catalog",
131
+ "name": "bool"
132
+ },
133
+ "nativeWitnessOid": 62,
134
+ "originSql": [
135
+ {
136
+ "id": "_ROLE",
137
+ "sha256": "2e5f6cbb0fbdd9a25756cf2427fafd55c2578c1e03499a6d287d0981d5aa9fe6",
138
+ "parameterVariant": "no-params"
139
+ },
140
+ {
141
+ "id": "_TABLE",
142
+ "sha256": "2c0f17ae15c2fba1c085d832dbffd8300e93fda505f38db36e70c1fe47eeb0d7",
143
+ "parameterVariant": "unknown-strings"
144
+ },
145
+ {
146
+ "id": "_KEYS",
147
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
148
+ "parameterVariant": "int2"
149
+ },
150
+ {
151
+ "id": "_KEYS",
152
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
153
+ "parameterVariant": "int4"
154
+ },
155
+ {
156
+ "id": "_KEYS",
157
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
158
+ "parameterVariant": "int8"
159
+ },
160
+ {
161
+ "id": "_RESOLUTION",
162
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
163
+ "parameterVariant": "text-array-bool-unknown"
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "schema": "pg_catalog",
169
+ "name": "int24gt",
170
+ "arguments": [
171
+ {
172
+ "schema": "pg_catalog",
173
+ "name": "int2"
174
+ },
175
+ {
176
+ "schema": "pg_catalog",
177
+ "name": "int4"
178
+ }
179
+ ],
180
+ "result": {
181
+ "schema": "pg_catalog",
182
+ "name": "bool"
183
+ },
184
+ "nativeWitnessOid": 162,
185
+ "originSql": [
186
+ {
187
+ "id": "_COLUMNS",
188
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
189
+ "parameterVariant": "int2"
190
+ },
191
+ {
192
+ "id": "_COLUMNS",
193
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
194
+ "parameterVariant": "int4"
195
+ },
196
+ {
197
+ "id": "_COLUMNS",
198
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
199
+ "parameterVariant": "int8"
200
+ },
201
+ {
202
+ "id": "_SHAPE",
203
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
204
+ "parameterVariant": "int2[]"
205
+ },
206
+ {
207
+ "id": "_SHAPE",
208
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
209
+ "parameterVariant": "int4[]"
210
+ },
211
+ {
212
+ "id": "_SHAPE",
213
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
214
+ "parameterVariant": "int8[]"
215
+ }
216
+ ]
217
+ },
218
+ {
219
+ "schema": "pg_catalog",
220
+ "name": "oideq",
221
+ "arguments": [
222
+ {
223
+ "schema": "pg_catalog",
224
+ "name": "oid"
225
+ },
226
+ {
227
+ "schema": "pg_catalog",
228
+ "name": "oid"
229
+ }
230
+ ],
231
+ "result": {
232
+ "schema": "pg_catalog",
233
+ "name": "bool"
234
+ },
235
+ "nativeWitnessOid": 184,
236
+ "originSql": [
237
+ {
238
+ "id": "_TABLE",
239
+ "sha256": "2c0f17ae15c2fba1c085d832dbffd8300e93fda505f38db36e70c1fe47eeb0d7",
240
+ "parameterVariant": "unknown-strings"
241
+ },
242
+ {
243
+ "id": "_COLUMNS",
244
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
245
+ "parameterVariant": "int2"
246
+ },
247
+ {
248
+ "id": "_COLUMNS",
249
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
250
+ "parameterVariant": "int4"
251
+ },
252
+ {
253
+ "id": "_COLUMNS",
254
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
255
+ "parameterVariant": "int8"
256
+ },
257
+ {
258
+ "id": "_KEYS",
259
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
260
+ "parameterVariant": "int2"
261
+ },
262
+ {
263
+ "id": "_KEYS",
264
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
265
+ "parameterVariant": "int4"
266
+ },
267
+ {
268
+ "id": "_KEYS",
269
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
270
+ "parameterVariant": "int8"
271
+ },
272
+ {
273
+ "id": "_SHAPE",
274
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
275
+ "parameterVariant": "int2[]"
276
+ },
277
+ {
278
+ "id": "_SHAPE",
279
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
280
+ "parameterVariant": "int4[]"
281
+ },
282
+ {
283
+ "id": "_SHAPE",
284
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
285
+ "parameterVariant": "int8[]"
286
+ },
287
+ {
288
+ "id": "_RESOLUTION",
289
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
290
+ "parameterVariant": "text-array-bool-unknown"
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ "schema": "pg_catalog",
296
+ "name": "nameeqtext",
297
+ "arguments": [
298
+ {
299
+ "schema": "pg_catalog",
300
+ "name": "name"
301
+ },
302
+ {
303
+ "schema": "pg_catalog",
304
+ "name": "text"
305
+ }
306
+ ],
307
+ "result": {
308
+ "schema": "pg_catalog",
309
+ "name": "bool"
310
+ },
311
+ "nativeWitnessOid": 240,
312
+ "originSql": [
313
+ {
314
+ "id": "_KEYS",
315
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
316
+ "parameterVariant": "int2"
317
+ },
318
+ {
319
+ "id": "_KEYS",
320
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
321
+ "parameterVariant": "int4"
322
+ },
323
+ {
324
+ "id": "_KEYS",
325
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
326
+ "parameterVariant": "int8"
327
+ }
328
+ ]
329
+ },
330
+ {
331
+ "schema": "pg_catalog",
332
+ "name": "int4",
333
+ "arguments": [
334
+ {
335
+ "schema": "pg_catalog",
336
+ "name": "int2"
337
+ }
338
+ ],
339
+ "result": {
340
+ "schema": "pg_catalog",
341
+ "name": "int4"
342
+ },
343
+ "nativeWitnessOid": 313,
344
+ "originSql": [
345
+ {
346
+ "id": "_COLUMNS",
347
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
348
+ "parameterVariant": "int2"
349
+ },
350
+ {
351
+ "id": "_KEYS",
352
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
353
+ "parameterVariant": "int2"
354
+ },
355
+ {
356
+ "id": "_SHAPE",
357
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
358
+ "parameterVariant": "int2[]"
359
+ }
360
+ ]
361
+ },
362
+ {
363
+ "schema": "pg_catalog",
364
+ "name": "text",
365
+ "arguments": [
366
+ {
367
+ "schema": "pg_catalog",
368
+ "name": "name"
369
+ }
370
+ ],
371
+ "result": {
372
+ "schema": "pg_catalog",
373
+ "name": "text"
374
+ },
375
+ "nativeWitnessOid": 406,
376
+ "originSql": [
377
+ {
378
+ "id": "_RESOLUTION",
379
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
380
+ "parameterVariant": "text-array-bool-unknown"
381
+ }
382
+ ]
383
+ },
384
+ {
385
+ "schema": "pg_catalog",
386
+ "name": "int4",
387
+ "arguments": [
388
+ {
389
+ "schema": "pg_catalog",
390
+ "name": "int8"
391
+ }
392
+ ],
393
+ "result": {
394
+ "schema": "pg_catalog",
395
+ "name": "int4"
396
+ },
397
+ "nativeWitnessOid": 480,
398
+ "originSql": [
399
+ {
400
+ "id": "_KEYS",
401
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
402
+ "parameterVariant": "int2"
403
+ },
404
+ {
405
+ "id": "_KEYS",
406
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
407
+ "parameterVariant": "int4"
408
+ },
409
+ {
410
+ "id": "_KEYS",
411
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
412
+ "parameterVariant": "int8"
413
+ }
414
+ ]
415
+ },
416
+ {
417
+ "schema": "pg_catalog",
418
+ "name": "current_database",
419
+ "arguments": [],
420
+ "result": {
421
+ "schema": "pg_catalog",
422
+ "name": "name"
423
+ },
424
+ "nativeWitnessOid": 861,
425
+ "originSql": [
426
+ {
427
+ "id": "_RESOLUTION",
428
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
429
+ "parameterVariant": "text-array-bool-unknown"
430
+ }
431
+ ]
432
+ },
433
+ {
434
+ "schema": "pg_catalog",
435
+ "name": "textcat",
436
+ "arguments": [
437
+ {
438
+ "schema": "pg_catalog",
439
+ "name": "text"
440
+ },
441
+ {
442
+ "schema": "pg_catalog",
443
+ "name": "text"
444
+ }
445
+ ],
446
+ "result": {
447
+ "schema": "pg_catalog",
448
+ "name": "text"
449
+ },
450
+ "nativeWitnessOid": 1258,
451
+ "originSql": [
452
+ {
453
+ "id": "_RESOLUTION",
454
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
455
+ "parameterVariant": "text-array-bool-unknown"
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ "schema": "pg_catalog",
461
+ "name": "int84mi",
462
+ "arguments": [
463
+ {
464
+ "schema": "pg_catalog",
465
+ "name": "int8"
466
+ },
467
+ {
468
+ "schema": "pg_catalog",
469
+ "name": "int4"
470
+ }
471
+ ],
472
+ "result": {
473
+ "schema": "pg_catalog",
474
+ "name": "int8"
475
+ },
476
+ "nativeWitnessOid": 1275,
477
+ "originSql": [
478
+ {
479
+ "id": "_KEYS",
480
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
481
+ "parameterVariant": "int2"
482
+ },
483
+ {
484
+ "id": "_KEYS",
485
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
486
+ "parameterVariant": "int4"
487
+ },
488
+ {
489
+ "id": "_KEYS",
490
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
491
+ "parameterVariant": "int8"
492
+ }
493
+ ]
494
+ },
495
+ {
496
+ "schema": "pg_catalog",
497
+ "name": "quote_ident",
498
+ "arguments": [
499
+ {
500
+ "schema": "pg_catalog",
501
+ "name": "text"
502
+ }
503
+ ],
504
+ "result": {
505
+ "schema": "pg_catalog",
506
+ "name": "text"
507
+ },
508
+ "nativeWitnessOid": 1282,
509
+ "originSql": [
510
+ {
511
+ "id": "_RESOLUTION",
512
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
513
+ "parameterVariant": "text-array-bool-unknown"
514
+ }
515
+ ]
516
+ },
517
+ {
518
+ "schema": "pg_catalog",
519
+ "name": "oid",
520
+ "arguments": [
521
+ {
522
+ "schema": "pg_catalog",
523
+ "name": "int8"
524
+ }
525
+ ],
526
+ "result": {
527
+ "schema": "pg_catalog",
528
+ "name": "oid"
529
+ },
530
+ "nativeWitnessOid": 1287,
531
+ "originSql": [
532
+ {
533
+ "id": "_COLUMNS",
534
+ "sha256": "f72756ea19e874a864df94d7fca92f5199a58aa8e2212240b0c2acddb779b33b",
535
+ "parameterVariant": "int8"
536
+ },
537
+ {
538
+ "id": "_KEYS",
539
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
540
+ "parameterVariant": "int8"
541
+ },
542
+ {
543
+ "id": "_SHAPE",
544
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
545
+ "parameterVariant": "int8[]"
546
+ }
547
+ ]
548
+ },
549
+ {
550
+ "schema": "pg_catalog",
551
+ "name": "current_schemas",
552
+ "arguments": [
553
+ {
554
+ "schema": "pg_catalog",
555
+ "name": "bool"
556
+ }
557
+ ],
558
+ "result": {
559
+ "schema": "pg_catalog",
560
+ "name": "_name"
561
+ },
562
+ "nativeWitnessOid": 1403,
563
+ "originSql": [
564
+ {
565
+ "id": "_RESOLUTION",
566
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
567
+ "parameterVariant": "text-array-bool-unknown"
568
+ }
569
+ ]
570
+ },
571
+ {
572
+ "schema": "pg_catalog",
573
+ "name": "int82le",
574
+ "arguments": [
575
+ {
576
+ "schema": "pg_catalog",
577
+ "name": "int8"
578
+ },
579
+ {
580
+ "schema": "pg_catalog",
581
+ "name": "int2"
582
+ }
583
+ ],
584
+ "result": {
585
+ "schema": "pg_catalog",
586
+ "name": "bool"
587
+ },
588
+ "nativeWitnessOid": 1860,
589
+ "originSql": [
590
+ {
591
+ "id": "_KEYS",
592
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
593
+ "parameterVariant": "int2"
594
+ },
595
+ {
596
+ "id": "_KEYS",
597
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
598
+ "parameterVariant": "int4"
599
+ },
600
+ {
601
+ "id": "_KEYS",
602
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
603
+ "parameterVariant": "int8"
604
+ }
605
+ ]
606
+ },
607
+ {
608
+ "schema": "pg_catalog",
609
+ "name": "set_config",
610
+ "arguments": [
611
+ {
612
+ "schema": "pg_catalog",
613
+ "name": "text"
614
+ },
615
+ {
616
+ "schema": "pg_catalog",
617
+ "name": "text"
618
+ },
619
+ {
620
+ "schema": "pg_catalog",
621
+ "name": "bool"
622
+ }
623
+ ],
624
+ "result": {
625
+ "schema": "pg_catalog",
626
+ "name": "text"
627
+ },
628
+ "nativeWitnessOid": 2078,
629
+ "originSql": [
630
+ {
631
+ "id": "inline-a24f29197f6a",
632
+ "sha256": "a24f29197f6a349ae81e10693b97a062195fa5027ed2976e3758fb2e03392849",
633
+ "parameterVariant": "unknown-strings"
634
+ },
635
+ {
636
+ "id": "inline-6f0a092bfd47",
637
+ "sha256": "6f0a092bfd47e34756c8981defc3c5eb684025a0c60dfbe4ac5d3d6fb894c068",
638
+ "parameterVariant": "unknown-strings"
639
+ },
640
+ {
641
+ "id": "inline-79424d69b495",
642
+ "sha256": "79424d69b495c9e84fbf10c55e320e5ba12278a37887509b1515009832186e9e",
643
+ "parameterVariant": "unknown-strings"
644
+ }
645
+ ]
646
+ },
647
+ {
648
+ "schema": "pg_catalog",
649
+ "name": "unnest",
650
+ "arguments": [
651
+ {
652
+ "schema": "pg_catalog",
653
+ "name": "anyarray"
654
+ }
655
+ ],
656
+ "result": {
657
+ "schema": "pg_catalog",
658
+ "name": "anyelement"
659
+ },
660
+ "nativeWitnessOid": 2331,
661
+ "originSql": [
662
+ {
663
+ "id": "_KEYS",
664
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
665
+ "parameterVariant": "int2"
666
+ },
667
+ {
668
+ "id": "_KEYS",
669
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
670
+ "parameterVariant": "int4"
671
+ },
672
+ {
673
+ "id": "_KEYS",
674
+ "sha256": "4ab8f52c86d796021d053f5f5e6b7f726a3d5e9511d0564f2054c9da88c54c70",
675
+ "parameterVariant": "int8"
676
+ },
677
+ {
678
+ "id": "_SHAPE",
679
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
680
+ "parameterVariant": "int2[]"
681
+ },
682
+ {
683
+ "id": "_SHAPE",
684
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
685
+ "parameterVariant": "int4[]"
686
+ },
687
+ {
688
+ "id": "_SHAPE",
689
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
690
+ "parameterVariant": "int8[]"
691
+ },
692
+ {
693
+ "id": "_RESOLUTION",
694
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
695
+ "parameterVariant": "text-array-bool-unknown"
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ "schema": "pg_catalog",
701
+ "name": "pg_has_role",
702
+ "arguments": [
703
+ {
704
+ "schema": "pg_catalog",
705
+ "name": "name"
706
+ },
707
+ {
708
+ "schema": "pg_catalog",
709
+ "name": "oid"
710
+ },
711
+ {
712
+ "schema": "pg_catalog",
713
+ "name": "text"
714
+ }
715
+ ],
716
+ "result": {
717
+ "schema": "pg_catalog",
718
+ "name": "bool"
719
+ },
720
+ "nativeWitnessOid": 2706,
721
+ "originSql": [
722
+ {
723
+ "id": "_TABLE",
724
+ "sha256": "2c0f17ae15c2fba1c085d832dbffd8300e93fda505f38db36e70c1fe47eeb0d7",
725
+ "parameterVariant": "unknown-strings"
726
+ }
727
+ ]
728
+ },
729
+ {
730
+ "schema": "pg_catalog",
731
+ "name": "jsonb_agg",
732
+ "arguments": [
733
+ {
734
+ "schema": "pg_catalog",
735
+ "name": "anyelement"
736
+ }
737
+ ],
738
+ "result": {
739
+ "schema": "pg_catalog",
740
+ "name": "jsonb"
741
+ },
742
+ "nativeWitnessOid": 3267,
743
+ "originSql": [
744
+ {
745
+ "id": "_SHAPE",
746
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
747
+ "parameterVariant": "int2[]"
748
+ },
749
+ {
750
+ "id": "_SHAPE",
751
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
752
+ "parameterVariant": "int4[]"
753
+ },
754
+ {
755
+ "id": "_SHAPE",
756
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
757
+ "parameterVariant": "int8[]"
758
+ }
759
+ ]
760
+ },
761
+ {
762
+ "schema": "pg_catalog",
763
+ "name": "jsonb_build_array",
764
+ "arguments": [
765
+ {
766
+ "schema": "pg_catalog",
767
+ "name": "any"
768
+ }
769
+ ],
770
+ "result": {
771
+ "schema": "pg_catalog",
772
+ "name": "jsonb"
773
+ },
774
+ "nativeWitnessOid": 3271,
775
+ "originSql": [
776
+ {
777
+ "id": "_SHAPE",
778
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
779
+ "parameterVariant": "int2[]"
780
+ },
781
+ {
782
+ "id": "_SHAPE",
783
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
784
+ "parameterVariant": "int4[]"
785
+ },
786
+ {
787
+ "id": "_SHAPE",
788
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
789
+ "parameterVariant": "int8[]"
790
+ }
791
+ ]
792
+ },
793
+ {
794
+ "schema": "pg_catalog",
795
+ "name": "jsonb_build_object",
796
+ "arguments": [
797
+ {
798
+ "schema": "pg_catalog",
799
+ "name": "any"
800
+ }
801
+ ],
802
+ "result": {
803
+ "schema": "pg_catalog",
804
+ "name": "jsonb"
805
+ },
806
+ "nativeWitnessOid": 3273,
807
+ "originSql": [
808
+ {
809
+ "id": "_SHAPE",
810
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
811
+ "parameterVariant": "int2[]"
812
+ },
813
+ {
814
+ "id": "_SHAPE",
815
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
816
+ "parameterVariant": "int4[]"
817
+ },
818
+ {
819
+ "id": "_SHAPE",
820
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
821
+ "parameterVariant": "int8[]"
822
+ }
823
+ ]
824
+ },
825
+ {
826
+ "schema": "pg_catalog",
827
+ "name": "pg_control_system",
828
+ "arguments": [],
829
+ "result": {
830
+ "schema": "pg_catalog",
831
+ "name": "record"
832
+ },
833
+ "nativeWitnessOid": 3441,
834
+ "originSql": [
835
+ {
836
+ "id": "_RESOLUTION",
837
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
838
+ "parameterVariant": "text-array-bool-unknown"
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ "schema": "pg_catalog",
844
+ "name": "to_regclass",
845
+ "arguments": [
846
+ {
847
+ "schema": "pg_catalog",
848
+ "name": "text"
849
+ }
850
+ ],
851
+ "result": {
852
+ "schema": "pg_catalog",
853
+ "name": "regclass"
854
+ },
855
+ "nativeWitnessOid": 3495,
856
+ "originSql": [
857
+ {
858
+ "id": "_RESOLUTION",
859
+ "sha256": "8e4c47059c4ea8f811d19a13d65332b0e4129afb625db10a9ceb621b33b55d5c",
860
+ "parameterVariant": "text-array-bool-unknown"
861
+ },
862
+ {
863
+ "id": "inline-365ce44eecfd",
864
+ "sha256": "365ce44eecfd313c769f71d7aeba48e43087273d4c1cb2d263b259b976d96241",
865
+ "parameterVariant": "unknown-strings"
866
+ }
867
+ ]
868
+ },
869
+ {
870
+ "schema": "pg_catalog",
871
+ "name": "to_jsonb",
872
+ "arguments": [
873
+ {
874
+ "schema": "pg_catalog",
875
+ "name": "anyelement"
876
+ }
877
+ ],
878
+ "result": {
879
+ "schema": "pg_catalog",
880
+ "name": "jsonb"
881
+ },
882
+ "nativeWitnessOid": 3787,
883
+ "originSql": [
884
+ {
885
+ "id": "_SHAPE",
886
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
887
+ "parameterVariant": "int2[]"
888
+ },
889
+ {
890
+ "id": "_SHAPE",
891
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
892
+ "parameterVariant": "int4[]"
893
+ },
894
+ {
895
+ "id": "_SHAPE",
896
+ "sha256": "ec2166fbf89ba2e33f93756dc2ab135aea1dfbf6ebcfc4c91078a45c8c1fba54",
897
+ "parameterVariant": "int8[]"
898
+ }
899
+ ]
900
+ }
901
+ ],
902
+ "runtimeRelations": [
903
+ {
904
+ "schema": "pg_catalog",
905
+ "relation": "pg_roles",
906
+ "columns": [
907
+ "rolname",
908
+ "rolsuper",
909
+ "rolbypassrls"
910
+ ],
911
+ "wholeRow": false,
912
+ "originSqlIds": [
913
+ "_ROLE"
914
+ ]
915
+ },
916
+ {
917
+ "schema": "pg_catalog",
918
+ "relation": "pg_class",
919
+ "columns": [
920
+ "oid",
921
+ "relname",
922
+ "relnamespace",
923
+ "relowner",
924
+ "relkind",
925
+ "relrowsecurity",
926
+ "relforcerowsecurity",
927
+ "relam"
928
+ ],
929
+ "wholeRow": false,
930
+ "originSqlIds": [
931
+ "_KEYS",
932
+ "_RESOLUTION",
933
+ "_SHAPE",
934
+ "_TABLE"
935
+ ]
936
+ },
937
+ {
938
+ "schema": "pg_catalog",
939
+ "relation": "pg_namespace",
940
+ "columns": [
941
+ "oid",
942
+ "nspname"
943
+ ],
944
+ "wholeRow": false,
945
+ "originSqlIds": [
946
+ "_COLUMNS",
947
+ "_KEYS",
948
+ "_RESOLUTION",
949
+ "_SHAPE",
950
+ "_TABLE"
951
+ ]
952
+ },
953
+ {
954
+ "schema": "pg_catalog",
955
+ "relation": "pg_inherits",
956
+ "columns": [
957
+ "inhrelid",
958
+ "inhparent",
959
+ "inhseqno",
960
+ "inhdetachpending"
961
+ ],
962
+ "wholeRow": true,
963
+ "originSqlIds": [
964
+ "_SHAPE",
965
+ "_TABLE"
966
+ ]
967
+ },
968
+ {
969
+ "schema": "pg_catalog",
970
+ "relation": "pg_attribute",
971
+ "columns": [
972
+ "attrelid",
973
+ "attname",
974
+ "atttypid",
975
+ "attnum",
976
+ "attnotnull",
977
+ "attisdropped",
978
+ "attcollation",
979
+ "atttypmod",
980
+ "atthasdef",
981
+ "attidentity",
982
+ "attgenerated"
983
+ ],
984
+ "wholeRow": false,
985
+ "originSqlIds": [
986
+ "_COLUMNS",
987
+ "_KEYS",
988
+ "_SHAPE"
989
+ ]
990
+ },
991
+ {
992
+ "schema": "pg_catalog",
993
+ "relation": "pg_type",
994
+ "columns": [
995
+ "oid",
996
+ "typname",
997
+ "typnamespace",
998
+ "typowner",
999
+ "typlen",
1000
+ "typbyval",
1001
+ "typtype",
1002
+ "typcategory",
1003
+ "typispreferred",
1004
+ "typisdefined",
1005
+ "typdelim",
1006
+ "typrelid",
1007
+ "typsubscript",
1008
+ "typelem",
1009
+ "typarray",
1010
+ "typinput",
1011
+ "typoutput",
1012
+ "typreceive",
1013
+ "typsend",
1014
+ "typmodin",
1015
+ "typmodout",
1016
+ "typanalyze",
1017
+ "typalign",
1018
+ "typstorage",
1019
+ "typnotnull",
1020
+ "typbasetype",
1021
+ "typtypmod",
1022
+ "typndims",
1023
+ "typcollation",
1024
+ "typdefaultbin",
1025
+ "typdefault",
1026
+ "typacl"
1027
+ ],
1028
+ "wholeRow": true,
1029
+ "originSqlIds": [
1030
+ "_COLUMNS",
1031
+ "_KEYS",
1032
+ "_SHAPE"
1033
+ ]
1034
+ },
1035
+ {
1036
+ "schema": "pg_catalog",
1037
+ "relation": "pg_index",
1038
+ "columns": [
1039
+ "indexrelid",
1040
+ "indrelid",
1041
+ "indnkeyatts",
1042
+ "indisunique",
1043
+ "indimmediate",
1044
+ "indisvalid",
1045
+ "indisready",
1046
+ "indkey",
1047
+ "indcollation",
1048
+ "indclass",
1049
+ "indexprs",
1050
+ "indpred",
1051
+ "indnatts",
1052
+ "indnullsnotdistinct",
1053
+ "indisprimary",
1054
+ "indisexclusion",
1055
+ "indisclustered",
1056
+ "indcheckxmin",
1057
+ "indislive",
1058
+ "indisreplident",
1059
+ "indoption"
1060
+ ],
1061
+ "wholeRow": true,
1062
+ "originSqlIds": [
1063
+ "_KEYS",
1064
+ "_SHAPE"
1065
+ ]
1066
+ },
1067
+ {
1068
+ "schema": "pg_catalog",
1069
+ "relation": "pg_am",
1070
+ "columns": [
1071
+ "oid",
1072
+ "amname",
1073
+ "amhandler",
1074
+ "amtype"
1075
+ ],
1076
+ "wholeRow": true,
1077
+ "originSqlIds": [
1078
+ "_KEYS",
1079
+ "_SHAPE"
1080
+ ]
1081
+ },
1082
+ {
1083
+ "schema": "pg_catalog",
1084
+ "relation": "pg_opclass",
1085
+ "columns": [
1086
+ "oid",
1087
+ "opcmethod",
1088
+ "opcname",
1089
+ "opcnamespace",
1090
+ "opcowner",
1091
+ "opcfamily",
1092
+ "opcintype",
1093
+ "opcdefault",
1094
+ "opckeytype"
1095
+ ],
1096
+ "wholeRow": true,
1097
+ "originSqlIds": [
1098
+ "_KEYS",
1099
+ "_SHAPE"
1100
+ ]
1101
+ },
1102
+ {
1103
+ "schema": "pg_catalog",
1104
+ "relation": "pg_collation",
1105
+ "columns": [
1106
+ "oid",
1107
+ "collisdeterministic",
1108
+ "collname",
1109
+ "collnamespace",
1110
+ "collowner",
1111
+ "collprovider",
1112
+ "collencoding",
1113
+ "collcollate",
1114
+ "collctype",
1115
+ "colllocale",
1116
+ "collicurules",
1117
+ "collversion"
1118
+ ],
1119
+ "wholeRow": true,
1120
+ "originSqlIds": [
1121
+ "_KEYS",
1122
+ "_SHAPE"
1123
+ ]
1124
+ },
1125
+ {
1126
+ "schema": "pg_catalog",
1127
+ "relation": "pg_opfamily",
1128
+ "columns": [
1129
+ "oid",
1130
+ "opfmethod",
1131
+ "opfname",
1132
+ "opfnamespace",
1133
+ "opfowner"
1134
+ ],
1135
+ "wholeRow": true,
1136
+ "originSqlIds": [
1137
+ "_SHAPE"
1138
+ ]
1139
+ },
1140
+ {
1141
+ "schema": "pg_catalog",
1142
+ "relation": "pg_amop",
1143
+ "columns": [
1144
+ "oid",
1145
+ "amopfamily",
1146
+ "amoplefttype",
1147
+ "amoprighttype",
1148
+ "amopstrategy",
1149
+ "amoppurpose",
1150
+ "amopopr",
1151
+ "amopmethod",
1152
+ "amopsortfamily"
1153
+ ],
1154
+ "wholeRow": true,
1155
+ "originSqlIds": [
1156
+ "_SHAPE"
1157
+ ]
1158
+ },
1159
+ {
1160
+ "schema": "pg_catalog",
1161
+ "relation": "pg_extension",
1162
+ "columns": [
1163
+ "oid",
1164
+ "extname",
1165
+ "extnamespace",
1166
+ "extversion"
1167
+ ],
1168
+ "wholeRow": false,
1169
+ "originSqlIds": [
1170
+ "_SHAPE"
1171
+ ]
1172
+ },
1173
+ {
1174
+ "schema": "pg_catalog",
1175
+ "relation": "pg_database",
1176
+ "columns": [
1177
+ "oid",
1178
+ "datname"
1179
+ ],
1180
+ "wholeRow": false,
1181
+ "originSqlIds": [
1182
+ "_RESOLUTION"
1183
+ ]
1184
+ }
1185
+ ],
1186
+ "selectedFixtureOwnerFunctions": [
1187
+ {
1188
+ "schema": "pg_catalog",
1189
+ "name": "booleq",
1190
+ "arguments": [
1191
+ {
1192
+ "schema": "pg_catalog",
1193
+ "name": "bool"
1194
+ },
1195
+ {
1196
+ "schema": "pg_catalog",
1197
+ "name": "bool"
1198
+ }
1199
+ ],
1200
+ "result": {
1201
+ "schema": "pg_catalog",
1202
+ "name": "bool"
1203
+ },
1204
+ "nativeWitnessOid": 60,
1205
+ "originSql": [
1206
+ {
1207
+ "id": "owner-business-1",
1208
+ "sha256": "21e922fa5e31f242f25ad1f95f3c82eaf046d5f4377d9aaad35550b26cf97eba",
1209
+ "parameterVariant": "captured-owner-parameters"
1210
+ }
1211
+ ]
1212
+ },
1213
+ {
1214
+ "schema": "pg_catalog",
1215
+ "name": "int8",
1216
+ "arguments": [
1217
+ {
1218
+ "schema": "pg_catalog",
1219
+ "name": "int4"
1220
+ }
1221
+ ],
1222
+ "result": {
1223
+ "schema": "pg_catalog",
1224
+ "name": "int8"
1225
+ },
1226
+ "nativeWitnessOid": 481,
1227
+ "originSql": [
1228
+ {
1229
+ "id": "owner-business-0",
1230
+ "sha256": "4bf99a2e6fbf7dee78b7b1c762556708dec109f37f8d42ea76022f3319df1110",
1231
+ "parameterVariant": "captured-owner-parameters"
1232
+ }
1233
+ ]
1234
+ },
1235
+ {
1236
+ "schema": "pg_catalog",
1237
+ "name": "text_gt",
1238
+ "arguments": [
1239
+ {
1240
+ "schema": "pg_catalog",
1241
+ "name": "text"
1242
+ },
1243
+ {
1244
+ "schema": "pg_catalog",
1245
+ "name": "text"
1246
+ }
1247
+ ],
1248
+ "result": {
1249
+ "schema": "pg_catalog",
1250
+ "name": "bool"
1251
+ },
1252
+ "nativeWitnessOid": 742,
1253
+ "originSql": [
1254
+ {
1255
+ "id": "owner-business-1",
1256
+ "sha256": "21e922fa5e31f242f25ad1f95f3c82eaf046d5f4377d9aaad35550b26cf97eba",
1257
+ "parameterVariant": "captured-owner-parameters"
1258
+ }
1259
+ ]
1260
+ },
1261
+ {
1262
+ "schema": "pg_catalog",
1263
+ "name": "int8",
1264
+ "arguments": [
1265
+ {
1266
+ "schema": "pg_catalog",
1267
+ "name": "int2"
1268
+ }
1269
+ ],
1270
+ "result": {
1271
+ "schema": "pg_catalog",
1272
+ "name": "int8"
1273
+ },
1274
+ "nativeWitnessOid": 754,
1275
+ "originSql": [
1276
+ {
1277
+ "id": "owner-business-1",
1278
+ "sha256": "21e922fa5e31f242f25ad1f95f3c82eaf046d5f4377d9aaad35550b26cf97eba",
1279
+ "parameterVariant": "captured-owner-parameters"
1280
+ }
1281
+ ]
1282
+ }
1283
+ ],
1284
+ "nativeSdkSourceFiles": {
1285
+ "umf_access/__init__.py": "767836329333329c211f57b23116b0aff5f35ced12c9eb2988474c6fdd113cb9",
1286
+ "umf_access/adoption.py": "42dedd7ae908c4194a99c586e9056cfeda638209c4f2d56426d2c15383aaafd2",
1287
+ "umf_access/bulk.py": "cd947c132b909e97b1d77d39b93b3fe59cece99412fae65040beaebccaf5d19d",
1288
+ "umf_access/capture.py": "8f391f644b6794b83a52ee7754544c9a6914022de66ad40e3c1499c2609c2586",
1289
+ "umf_access/catalog.py": "3e92c5a24ea2bc16bcfa796ff10d8942cf3b31ac560342040934f82c6c8ae3cb",
1290
+ "umf_access/codec_support.py": "2d99a82a08ab7168d3782543e42495b3605d43d75e2834fa7c4b7c609763f700",
1291
+ "umf_access/commands.py": "1a79461725d561b1217b9031374416df9ebf38a8875448c22d3e751df019123c",
1292
+ "umf_access/delta_read.py": "ea9cf42a663a014e6953847865be29d596d2b253b367ae1aff4f7b1d65bd9893",
1293
+ "umf_access/engine_catalog.py": "dcd1eae05ae0d7b9b2c9e5dd09d94fcd56dd920caf4aa7ab7827af01ecee91eb",
1294
+ "umf_access/managed_actions.py": "f9c05769d52786fb7e4c4756b7444c08017b1546d7ef9d1bf34901a06829e584",
1295
+ "umf_access/managed_bulk.py": "7b911affd616882806d133511d792bf74e75a3f0035a77e41b164d4df46c5bd6",
1296
+ "umf_access/managed_delta.py": "4d46234e1b1e64fc92dbac89981a1fd3e652a24c6e5fdabff1c87836d6cb8617",
1297
+ "umf_access/managed_support.py": "c652f5afec7d9344af6f26cecd1be0ba09ae0e0788fd48a7e9fcf419ad325616",
1298
+ "umf_access/native_actions.py": "1abca7c496470968e5d8872850e62af27652b5bcea2a03f76d195eeb83036d15",
1299
+ "umf_access/native_program.py": "50388efcaf91bda7dc566c3d22268f0e19fe11a6515acf312fd6eb47edda2184",
1300
+ "umf_access/pages.py": "ba6f61af9426a954d2c6d4b84ff1e2baff70f08a4ee2a18fd2f1dc0a0767a4a6",
1301
+ "umf_access/postgres_bulk.py": "0ca598b133837bb5f7cd8909ecaec1a123898547c7576a48f015b81d46146073",
1302
+ "umf_access/postgres_read.py": "1d32b92015cfb3eacf5f2caa08f152a60d1c6bc99508895f4da856642ba76010",
1303
+ "umf_access/postgres_search.py": "551fb7432a177d7f92ea232bd0dd64e5764670f46294b43932fdf4e88fbd7b06",
1304
+ "umf_access/protocols.py": "3de9750adcd78e6e7b95374771e9b4385e4326c31ea1cbc4d6930cbd1daa82c3",
1305
+ "umf_access/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
1306
+ "umf_access/related_keys.py": "bfb831ec71a21ce35b0ec8630d7c1f54060a95042a75eb21cec29b8b68da2c0c",
1307
+ "umf_access/reviewed.py": "ecca027076ca2a855ffe96c4456c93840de218028296b2abee1253a44d732d10",
1308
+ "umf_access/search_catalog.py": "0c12485ca262052faf7bd2bf5b81140aa5b4f5ffb90186183dd2af2c45c28832",
1309
+ "umf_access/targets.py": "2c34e7c988e05c19ef6fb6690f5186eab68f089583009fbee36cfc19be61c472",
1310
+ "umf_access/types.py": "b003ca6d6a84446a2f0eb32d26187c5adc27dbf62936ce6f69827b6a1f9a2d5e",
1311
+ "umf_access/unity_search.py": "39ea9b4c8fce488982349ffac768506db860e7eb3f16a1b260a97e69cfae6e17",
1312
+ "umf_access/values.py": "c8aab7363a09c38d77b8f60c2b97fa361fc4b80f522e9d1d3f7cbaaf32b5d848",
1313
+ "umf_access/verification.py": "070ea416451d8cc8e26482173557c067b8e25137ef1d9778c00c30259f8ba48b",
1314
+ "umf_access/build/__init__.py": "f2a7ac0078bc169c017a8b280d6ad7fc4f45ea043d25c987890ed015fae3db9c",
1315
+ "umf_access/build/catalog.py": "9d3d8abe5a49a61acdd1721395c4acf037a04f4a60de09665610d9c2cfb21106",
1316
+ "umf_access/build/commands.py": "b92e8a37d363d260d7fa345c38d293c7ab54bebda91cfc14f84666495821a6f2",
1317
+ "umf_access/build/privileges.py": "4647689ef639272b2c3d3b5d1a96af50b366b932d5a816cba55991495d00a27a",
1318
+ "umf_access/build/search.py": "17b1e5f3defdcf9f2e1b7e117ca069eaa849e89865801b3d1d881ce0e0845b42",
1319
+ "umf_access/build/unity_search.py": "bc9e67b576699ed66d01a502212c8d23b3b7917486c4139ae06f3cf9a6008fda",
1320
+ "umf_access/dsl/__init__.py": "c8d509c865e54a032a4c720b8965ace080b6867360e649606942d186119546dc",
1321
+ "umf_access/dsl/_context.py": "a73451718cc072692ae821971e17e1ebd23eee98e1bca9401ba7b285b4fdf2d7",
1322
+ "umf_access/dsl/_expressions.py": "c22a687e5fb057b1e979ad90103ab0824f0bcdae9c373bb186862adebf04501e",
1323
+ "umf_access/dsl/_joined.py": "65a897ab4f0cae0eb66ec3afed6164d1a014774cb159e5c7efee1382bc3884cb",
1324
+ "umf_access/dsl/_nodes.py": "aeeda9c07fd5072449bb6533155f0a4bf77b8cef23d0de694f55cf2e386c9bf8",
1325
+ "umf_access/dsl/_query.py": "2b92bd376109038cba8d28961788ef64e2dd40be5dbcdd2d2fac52313e557f1b",
1326
+ "umf_access/dsl/_selection.py": "fe574f91ee55de766feda900081050a7dc8f4a0fa324002ad46102d527caf5ef",
1327
+ "umf_access/dsl/navigation.py": "2ef3f1bf450ab2a6213634280014e7c957e3b1d24b23f81b1f1bb91e2f19e7f6",
1328
+ "umf_access/dsl/render.py": "e0f2daddc00b10e2c27deb21eaf2916f4a1e6bf289f2dbc4f33e86316d695da1",
1329
+ "umf_access/dsl/search.py": "d1dea05095662ca06bb0e0bb9dac7156c5b1b94dc60f162d6f6887d02abd2dde"
1330
+ }
1331
+ }""")
1332
+
1333
+
1334
+ _TESTED_REFERENCE = r"""{
1335
+ "version": "umf.pg-privilege-qualification-reference/0.1",
1336
+ "scope": "exact owned plain/pages generated catalog; current SDK metadata/cache/closing/read/page/stream sync/async paths only",
1337
+ "sdkWheelSha256": "b1acf1978672c1f1ba7af0593d33bbbbc8c34f65a715839eed8b58f4dff5556c",
1338
+ "weftWheelSha256": "26d20aa8e4d1bac465051498b1a3fe4fdf01dd0a2fee1591e755099d8e8e4323",
1339
+ "catalogSha256": "2f06038d4007a32c3727e60e40a93db974a30a4debc337220a3d0e6cf2171a59",
1340
+ "selectedEntries": [
1341
+ {
1342
+ "name": "plain",
1343
+ "kind": "query",
1344
+ "targetId": "local",
1345
+ "originalStructuralDigest": "3a86cb6658e15c89f7053c9735e0b09326cb526542d9920cbfb55b0e27501f31"
1346
+ },
1347
+ {
1348
+ "name": "pages",
1349
+ "kind": "query",
1350
+ "targetId": "local",
1351
+ "originalStructuralDigest": "3d9913d325caeda8751360cc39162a178c28e16951b0fe681ecd30b191a62a55"
1352
+ }
1353
+ ],
1354
+ "observedNecessaryFunctions": 27,
1355
+ "runtimeFunctions": 23,
1356
+ "metadataRelations": 14,
1357
+ "nativeVersion": 180006,
1358
+ "inventoryComplete": false,
1359
+ "nativeAuthority": false,
1360
+ "unresolved": [
1361
+ "other selected programs/capabilities require their own owner/runtime path inventories",
1362
+ "actions/bulk/search/managed/engine grants not qualified by this read catalog",
1363
+ "production report reference integration and reporting ABI correspondence require root review"
1364
+ ],
1365
+ "temporal": "HELD",
1366
+ "sdkSourceCommit": "7b206ef3b2720500c8409b17915629e4aac11448",
1367
+ "weftSourceCommit": "8bf99117f1e4ab6fd8d4506b25bfdd8214c9afd6",
1368
+ "packet": "docs/helix/04-build/evidence/typed-persistence/runtime-privilege-r19-20261017",
1369
+ "packetInventorySha256": "6a86cb623bf4489983a7751791771f991a0185e3f4e8554535e7ae07c43eb1e5",
1370
+ "qualificationTransfer": false,
1371
+ "currentTargetQualified": false,
1372
+ "reportingAbiScope": "informative reference only; changing this report module does not qualify a new runtime wheel",
1373
+ "selectedOperations": [
1374
+ "plain read",
1375
+ "keyset page",
1376
+ "bounded stream",
1377
+ "cold/warm verification and cache",
1378
+ "selected metadata/admission/closing SQL",
1379
+ "sync/async execution and cancellation cleanup"
1380
+ ],
1381
+ "unselectedOperations": [
1382
+ "actions",
1383
+ "bulk commands",
1384
+ "search",
1385
+ "managed platforms",
1386
+ "engine targets"
1387
+ ]
1388
+ }"""
1389
+
1390
+
1391
+ def _source_snapshot() -> dict[str, Any]:
1392
+ path = Path(__file__).resolve().parent.parent / "postgres_read.py"
1393
+ try:
1394
+ source = path.read_bytes()
1395
+ tree = ast.parse(source)
1396
+ except (OSError, SyntaxError, ValueError) as error:
1397
+ return {"available": False, "reason": type(error).__name__}
1398
+ names = {
1399
+ node.value.value: node.targets[0].id
1400
+ for node in tree.body
1401
+ if isinstance(node, ast.Assign)
1402
+ and len(node.targets) == 1
1403
+ and isinstance(node.targets[0], ast.Name)
1404
+ and isinstance(node.value, ast.Constant)
1405
+ and isinstance(node.value.value, str)
1406
+ }
1407
+ sql: dict[str, dict[str, Any]] = {}
1408
+ for node in ast.walk(tree):
1409
+ if (
1410
+ isinstance(node, ast.Constant)
1411
+ and isinstance(node.value, str)
1412
+ and node.value.startswith(("SELECT ", "WITH ", "SET TRANSACTION "))
1413
+ ):
1414
+ digest = hashlib.sha256(node.value.encode()).hexdigest()
1415
+ key = names.get(node.value, "inline-" + digest[:12])
1416
+ entry = sql.setdefault(key, {"sha256": digest, "sourceLines": []})
1417
+ entry["sourceLines"].append(node.lineno)
1418
+ package = Path(__file__).resolve().parent.parent
1419
+ payloads: dict[str, str | None] = {}
1420
+ for name in _EVIDENCE["nativeSdkSourceFiles"]:
1421
+ try:
1422
+ payloads[name] = hashlib.sha256(
1423
+ (package / name.removeprefix("umf_access/")).read_bytes()
1424
+ ).hexdigest()
1425
+ except OSError:
1426
+ payloads[name] = None
1427
+ return {
1428
+ "available": True,
1429
+ "sha256": hashlib.sha256(source).hexdigest(),
1430
+ "fixedSql": sql,
1431
+ "nativePayloads": payloads,
1432
+ }
1433
+
1434
+
1435
+ def _quote(name: str) -> str:
1436
+ return '"' + name.replace('"', '""') + '"'
1437
+
1438
+
1439
+ def _reference_grants(data: dict[str, Any]) -> list[str]:
1440
+ principal = _quote("<principal>")
1441
+ grants = []
1442
+ for function in data["runtimeFunctions"]:
1443
+ arguments = ", ".join(
1444
+ _quote(t["schema"]) + "." + _quote(t["name"]) for t in function["arguments"]
1445
+ )
1446
+ name = _quote(function["schema"]) + "." + _quote(function["name"])
1447
+ grants.append(f"GRANT EXECUTE ON FUNCTION {name}({arguments}) TO {principal};")
1448
+ for relation in data["runtimeRelations"]:
1449
+ columns = ", ".join(_quote(name) for name in relation["columns"])
1450
+ name = _quote(relation["schema"]) + "." + _quote(relation["relation"])
1451
+ grants.append(f"GRANT SELECT ({columns}) ON TABLE {name} TO {principal};")
1452
+ return grants
1453
+
1454
+
1455
+ def postgres_runtime_advisory(
1456
+ target: dict[str, Any], entries: list[dict[str, Any]]
1457
+ ) -> dict[str, Any]:
1458
+ """Expose a partial reference proposal; never an inventory-complete claim."""
1459
+ data: dict[str, Any] = json.loads(json.dumps(_EVIDENCE))
1460
+ snapshot = _source_snapshot()
1461
+ expected = {key: value["sha256"] for key, value in data["fixedSql"].items()}
1462
+ observed = {
1463
+ key: value["sha256"] for key, value in snapshot.get("fixedSql", {}).items()
1464
+ }
1465
+ sql_match = snapshot["available"] and expected == observed
1466
+ source_match = (
1467
+ snapshot.get("sha256") == data["evidence"]["testedRuntimeSourceSha256"]
1468
+ and snapshot.get("nativePayloads") == data["nativeSdkSourceFiles"]
1469
+ )
1470
+ versions = {
1471
+ str(version)
1472
+ for platform in target.get("platform", [])
1473
+ if isinstance(platform, dict) and platform.get("name") == "postgresql"
1474
+ for version in platform.get("versions", [])
1475
+ }
1476
+ profile_match = (
1477
+ target["kind"] == "postgresql"
1478
+ and versions == {"180006"}
1479
+ and target.get("backendId") == "weft-postgresql"
1480
+ and target.get("backendVersion") == "raw-read/0.1"
1481
+ and target.get("targetProfile") == "weft.raw-read/0.1"
1482
+ )
1483
+ matching = []
1484
+ outside = []
1485
+ for entry in entries:
1486
+ artifact = entry["artifact"]
1487
+ binding = artifact.get("binding", {})
1488
+ if (
1489
+ entry["kind"] == "query"
1490
+ and (
1491
+ artifact.get("version") == "weft.raw-read/0.1"
1492
+ or (
1493
+ artifact.get("version") == "weft.raw-read/0.2"
1494
+ and catalog_fence(artifact) is not None
1495
+ )
1496
+ )
1497
+ and artifact.get("target") == "postgresql18"
1498
+ and isinstance(binding, dict)
1499
+ and binding.get("schemaBinding") == "qualified"
1500
+ ):
1501
+ matching.append(entry["name"])
1502
+ else:
1503
+ outside.append(entry["name"])
1504
+ reference_selected = bool(sql_match and profile_match and matching)
1505
+ data.update(
1506
+ {
1507
+ "status": "SCOPED_REFERENCE_ADVISORY"
1508
+ if reference_selected
1509
+ else "REFERENCE_ONLY_NOT_APPLICABLE",
1510
+ "inventoryComplete": False,
1511
+ "testedReferences": [json.loads(_TESTED_REFERENCE)],
1512
+ "sourceObservation": snapshot,
1513
+ "fixedSqlHashesMatch": bool(sql_match),
1514
+ "nativeTestedSourceMatches": source_match,
1515
+ "declaredNativeProfileMatches": profile_match,
1516
+ "matchingEntryNames": matching,
1517
+ "entriesOutsideRuntimeSlice": outside,
1518
+ "referenceGrantStatements": _reference_grants(data)
1519
+ if reference_selected
1520
+ else [],
1521
+ "grantStatementScope": "23 fixed read-runtime overloads and 14 metadata relations only; replace the quoted principal placeholder after host review; never executed by the SDK",
1522
+ "scope": "PostgreSQL18.6 qualified-schema read/page/stream fixed metadata SQL and verification cache; original compiler business/LOCK/admission SQL is separate",
1523
+ "currentSourceQualification": "NATIVE_TESTED_SOURCE"
1524
+ if source_match
1525
+ else "UNQUALIFIED_SOURCE_REVISION; matching SQL hashes do not qualify changed control flow",
1526
+ "notCovered": [
1527
+ "original compiler business/LOCK/native admissions",
1528
+ "search",
1529
+ "actions/bulk",
1530
+ "Lakebase and other native versions",
1531
+ "existing-view security lineage and future driver/platform qualifications",
1532
+ ],
1533
+ "hostOnlyObligations": [
1534
+ "application schema USAGE and original compiler table-level SELECT/LOCK grants",
1535
+ "review actual native ACLs and selected profile; never grant blanket pg_catalog privileges",
1536
+ "independent principal, current role/grants, RLS, DDL and source/version custody remain required",
1537
+ ],
1538
+ "qualification": {
1539
+ "leastPrivilege": "UNQUALIFIED",
1540
+ "sufficiencyClaim": False,
1541
+ },
1542
+ }
1543
+ )
1544
+ return data