pg_json 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/pg_json +3 -3
- metadata +1 -1
data/bin/pg_json
CHANGED
@@ -82,11 +82,11 @@ end
|
|
82
82
|
simple :date do
|
83
83
|
# "'\"'||to_char(data, 'YYYY-MM-DD')::text||'\"'"
|
84
84
|
# "'{\"__type__\":\"date\",\"value\":\"'||to_char(data, 'YYYY-MM-DD')::text||'\"}'"
|
85
|
-
"'date:'||to_char(data, 'YYYY-MM-DD')"
|
85
|
+
"'\"date:'||to_char(data, 'YYYY-MM-DD')||'\"'"
|
86
86
|
end
|
87
87
|
simple :time do
|
88
88
|
# "'\"'||to_char(data, 'HH24:MI:SS')::text||'\"'"
|
89
|
-
"'time:'||to_char(data, 'HH24:MI:SS')"
|
89
|
+
"'\"time:'||to_char(data, 'HH24:MI:SS')||'\"'"
|
90
90
|
end
|
91
91
|
# simple :timestamp do
|
92
92
|
# # "extract(epoch from data)::integer::text"
|
@@ -94,7 +94,7 @@ end
|
|
94
94
|
# end
|
95
95
|
simple :timestamp do
|
96
96
|
# "'{\"__type__\":\"timestamp\",\"value\":\"'||to_char(data, 'YYYY-MM-DD\"T\"HH24:MI:SS\"+02:00\"')||'\"}'"
|
97
|
-
"'timestamp:'||to_char(data, 'YYYY-MM-DD\"T\"HH24:MI:SS\"+02:00\"')"
|
97
|
+
"'\"timestamp:'||to_char(data, 'YYYY-MM-DD\"T\"HH24:MI:SS\"+02:00\"')||'\"'"
|
98
98
|
end
|
99
99
|
|
100
100
|
while composite = ARGV.slice!(0)
|