@@ -200,6 +200,65 @@ $$) as (i agtype);
200200 {"id": 281474976710659, "label": "", "properties": {"a": [7, 8, 9], "name": "node3", "type": "vertex"}}::vertex
201201(3 rows)
202202
203+ --
204+ -- Issue 1302
205+ --
206+ SELECT create_graph('issue_1302');
207+ NOTICE: graph "issue_1302" has been created
208+ create_graph
209+ --------------
210+
211+ (1 row)
212+
213+ SELECT * FROM cypher('cypher_unwind', $$
214+ CREATE (agtype {name: 'node1', a: [1, 2, 3]}),
215+ (m {name: 'node2', a: [4, 5, 6]}),
216+ (o {name: 'node3', a: [7, 8, 9]}),
217+ (n)-[:KNOWS]->(m),
218+ (m)-[:KNOWS]->(o)
219+ $$) as (i agtype);
220+ i
221+ ---
222+ (0 rows)
223+
224+ SELECT * FROM cypher('cypher_unwind', $$
225+ MATCH (n)
226+ WITH n.a AS a
227+ UNWIND a AS i
228+ RETURN *
229+ $$) as (i agtype, j agtype);
230+ i | j
231+ -----------+---
232+ [1, 2, 3] | 1
233+ [1, 2, 3] | 2
234+ [1, 2, 3] | 3
235+ [4, 5, 6] | 4
236+ [4, 5, 6] | 5
237+ [4, 5, 6] | 6
238+ [7, 8, 9] | 7
239+ [7, 8, 9] | 8
240+ [7, 8, 9] | 9
241+ [1, 2, 3] | 1
242+ [1, 2, 3] | 2
243+ [1, 2, 3] | 3
244+ [4, 5, 6] | 4
245+ [4, 5, 6] | 5
246+ [4, 5, 6] | 6
247+ [7, 8, 9] | 7
248+ [7, 8, 9] | 8
249+ [7, 8, 9] | 9
250+ |
251+ (19 rows)
252+
253+ SELECT * FROM cypher('cypher_unwind', $$
254+ UNWIND NULL as i
255+ RETURN i
256+ $$) as (i agtype);
257+ i
258+ ---
259+
260+ (1 row)
261+
203262--
204263-- Clean up
205264--
@@ -214,3 +273,13 @@ NOTICE: graph "cypher_unwind" has been dropped
214273
215274(1 row)
216275
276+ SELECT drop_graph('issue_1302', true);
277+ NOTICE: drop cascades to 2 other objects
278+ DETAIL: drop cascades to table issue_1302._ag_label_vertex
279+ drop cascades to table issue_1302._ag_label_edge
280+ NOTICE: graph "issue_1302" has been dropped
281+ drop_graph
282+ ------------
283+
284+ (1 row)
285+
0 commit comments