pg_json 0.1 → 0.1.1

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 (2) hide show
  1. data/bin/pg_json +8 -6
  2. 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
- for i in 1..array_upper(data,1) loop
68
- res = res || to_json(data[i]);
69
- if i < array_upper(data,1) then
70
- res = res || ',';
71
- end if;
72
- end loop;
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;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_json
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: