File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -305,15 +305,18 @@ BEGIN
305
305
IF sub .body IS NOT NULL THEN -- TODO: Nested JSON lookups
306
306
RAISE EXCEPTION ' Nested JSON lookup is as yet unimplemented' ;
307
307
END IF;
308
+ lookups := lookups || format(' ->%L' , sub .selector );
308
309
WHEN regtype(' hstore' ) THEN
309
310
IF sub .body IS NOT NULL THEN
310
311
RAISE EXCEPTION ' No fields below this level (column % is hstore)' ,
311
312
tab, col;
312
313
END IF;
314
+ lookups := lookups || format(' ->%L' , sub .selector );
313
315
ELSE
314
- RAISE EXCEPTION ' Unhandled nested type %s for %s.%s' , typ, tab, col;
316
+ -- - Treat it as a field lookup in a nested record (this could also end up
317
+ -- - being a function call, by the way).
318
+ lookups := lookups || format(' .%I' , sub .selector );
315
319
END CASE;
316
- lookups := lookups || format(' ->%L' , sub .selector );
317
320
labels := labels || format(' %I' , sub .selector );
318
321
END LOOP;
319
322
q := format(E' SELECT to_json(_) AS %I\n '
You can’t perform that action at this time.
0 commit comments