@@ -2344,6 +2344,152 @@ _copyJsonValueExpr(const JsonValueExpr *from)
2344
2344
return newnode ;
2345
2345
}
2346
2346
2347
+ /*
2348
+ * _copyJsonConstructorExpr
2349
+ */
2350
+ static JsonConstructorExpr *
2351
+ _copyJsonConstructorExpr (const JsonConstructorExpr * from )
2352
+ {
2353
+ JsonConstructorExpr * newnode = makeNode (JsonConstructorExpr );
2354
+
2355
+ COPY_SCALAR_FIELD (type );
2356
+ COPY_NODE_FIELD (args );
2357
+ COPY_NODE_FIELD (func );
2358
+ COPY_NODE_FIELD (coercion );
2359
+ COPY_NODE_FIELD (returning );
2360
+ COPY_SCALAR_FIELD (absent_on_null );
2361
+ COPY_SCALAR_FIELD (unique );
2362
+ COPY_LOCATION_FIELD (location );
2363
+
2364
+ return newnode ;
2365
+ }
2366
+
2367
+ /*
2368
+ * _copyJsonKeyValue
2369
+ */
2370
+ static JsonKeyValue *
2371
+ _copyJsonKeyValue (const JsonKeyValue * from )
2372
+ {
2373
+ JsonKeyValue * newnode = makeNode (JsonKeyValue );
2374
+
2375
+ COPY_NODE_FIELD (key );
2376
+ COPY_NODE_FIELD (value );
2377
+
2378
+ return newnode ;
2379
+ }
2380
+
2381
+ /*
2382
+ * _copyJsonObjectConstructor
2383
+ */
2384
+ static JsonObjectConstructor *
2385
+ _copyJsonObjectConstructor (const JsonObjectConstructor * from )
2386
+ {
2387
+ JsonObjectConstructor * newnode = makeNode (JsonObjectConstructor );
2388
+
2389
+ COPY_NODE_FIELD (exprs );
2390
+ COPY_NODE_FIELD (output );
2391
+ COPY_SCALAR_FIELD (absent_on_null );
2392
+ COPY_SCALAR_FIELD (unique );
2393
+ COPY_LOCATION_FIELD (location );
2394
+
2395
+ return newnode ;
2396
+ }
2397
+
2398
+ /*
2399
+ * _copyJsonAggConstructor
2400
+ */
2401
+ static JsonAggConstructor *
2402
+ _copyJsonAggConstructor (const JsonAggConstructor * from )
2403
+ {
2404
+ JsonAggConstructor * newnode = makeNode (JsonAggConstructor );
2405
+
2406
+ COPY_NODE_FIELD (output );
2407
+ COPY_NODE_FIELD (agg_filter );
2408
+ COPY_NODE_FIELD (agg_order );
2409
+ COPY_NODE_FIELD (over );
2410
+ COPY_LOCATION_FIELD (location );
2411
+
2412
+ return newnode ;
2413
+ }
2414
+
2415
+ /*
2416
+ * _copyJsonObjectAgg
2417
+ */
2418
+ static JsonObjectAgg *
2419
+ _copyJsonObjectAgg (const JsonObjectAgg * from )
2420
+ {
2421
+ JsonObjectAgg * newnode = makeNode (JsonObjectAgg );
2422
+
2423
+ COPY_NODE_FIELD (constructor );
2424
+ COPY_NODE_FIELD (arg );
2425
+ COPY_SCALAR_FIELD (absent_on_null );
2426
+ COPY_SCALAR_FIELD (unique );
2427
+
2428
+ return newnode ;
2429
+ }
2430
+
2431
+ /*
2432
+ * _copyJsonOutput
2433
+ */
2434
+ static JsonOutput *
2435
+ _copyJsonOutput (const JsonOutput * from )
2436
+ {
2437
+ JsonOutput * newnode = makeNode (JsonOutput );
2438
+
2439
+ COPY_NODE_FIELD (typeName );
2440
+ COPY_NODE_FIELD (returning );
2441
+
2442
+ return newnode ;
2443
+ }
2444
+
2445
+ /*
2446
+ * _copyJsonArrayConstructor
2447
+ */
2448
+ static JsonArrayConstructor *
2449
+ _copyJsonArrayConstructor (const JsonArrayConstructor * from )
2450
+ {
2451
+ JsonArrayConstructor * newnode = makeNode (JsonArrayConstructor );
2452
+
2453
+ COPY_NODE_FIELD (exprs );
2454
+ COPY_NODE_FIELD (output );
2455
+ COPY_SCALAR_FIELD (absent_on_null );
2456
+ COPY_LOCATION_FIELD (location );
2457
+
2458
+ return newnode ;
2459
+ }
2460
+
2461
+ /*
2462
+ * _copyJsonArrayAgg
2463
+ */
2464
+ static JsonArrayAgg *
2465
+ _copyJsonArrayAgg (const JsonArrayAgg * from )
2466
+ {
2467
+ JsonArrayAgg * newnode = makeNode (JsonArrayAgg );
2468
+
2469
+ COPY_NODE_FIELD (constructor );
2470
+ COPY_NODE_FIELD (arg );
2471
+ COPY_SCALAR_FIELD (absent_on_null );
2472
+
2473
+ return newnode ;
2474
+ }
2475
+
2476
+ /*
2477
+ * _copyJsonArrayQueryConstructor
2478
+ */
2479
+ static JsonArrayQueryConstructor *
2480
+ _copyJsonArrayQueryConstructor (const JsonArrayQueryConstructor * from )
2481
+ {
2482
+ JsonArrayQueryConstructor * newnode = makeNode (JsonArrayQueryConstructor );
2483
+
2484
+ COPY_NODE_FIELD (query );
2485
+ COPY_NODE_FIELD (output );
2486
+ COPY_NODE_FIELD (format );
2487
+ COPY_SCALAR_FIELD (absent_on_null );
2488
+ COPY_LOCATION_FIELD (location );
2489
+
2490
+ return newnode ;
2491
+ }
2492
+
2347
2493
/* ****************************************************************
2348
2494
* pathnodes.h copy functions
2349
2495
*
@@ -5406,6 +5552,33 @@ copyObjectImpl(const void *from)
5406
5552
case T_JsonValueExpr :
5407
5553
retval = _copyJsonValueExpr (from );
5408
5554
break ;
5555
+ case T_JsonKeyValue :
5556
+ retval = _copyJsonKeyValue (from );
5557
+ break ;
5558
+ case T_JsonConstructorExpr :
5559
+ retval = _copyJsonConstructorExpr (from );
5560
+ break ;
5561
+ case T_JsonObjectConstructor :
5562
+ retval = _copyJsonObjectConstructor (from );
5563
+ break ;
5564
+ case T_JsonAggConstructor :
5565
+ retval = _copyJsonAggConstructor (from );
5566
+ break ;
5567
+ case T_JsonObjectAgg :
5568
+ retval = _copyJsonObjectAgg (from );
5569
+ break ;
5570
+ case T_JsonOutput :
5571
+ retval = _copyJsonOutput (from );
5572
+ break ;
5573
+ case T_JsonArrayConstructor :
5574
+ retval = _copyJsonArrayConstructor (from );
5575
+ break ;
5576
+ case T_JsonArrayQueryConstructor :
5577
+ retval = _copyJsonArrayQueryConstructor (from );
5578
+ break ;
5579
+ case T_JsonArrayAgg :
5580
+ retval = _copyJsonArrayAgg (from );
5581
+ break ;
5409
5582
5410
5583
/*
5411
5584
* RELATION NODES
0 commit comments