pg_json 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/pg_json +8 -6
- metadata +1 -1
data/bin/pg_json
CHANGED
@@ -64,12 +64,14 @@ declare
|
|
64
64
|
begin
|
65
65
|
res = '[';
|
66
66
|
if data is not null then
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
67
|
+
if array_upper(data,1) is not null then
|
68
|
+
for i in 1..array_upper(data,1) loop
|
69
|
+
res = res || to_json(data[i]);
|
70
|
+
if i < array_upper(data,1) then
|
71
|
+
res = res || ',';
|
72
|
+
end if;
|
73
|
+
end loop;
|
74
|
+
end if;
|
73
75
|
end if;
|
74
76
|
res = res || ']';
|
75
77
|
return res;
|