pg_json 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/pg_json +4 -2
- metadata +1 -1
data/bin/pg_json
CHANGED
@@ -84,10 +84,12 @@ simple :date do
|
|
84
84
|
"'{\"__type__\":\"date\",\"value\":\"'||to_char(data, 'YYYY-MM-DD')::text||'\"}'"
|
85
85
|
end
|
86
86
|
simple :time do
|
87
|
-
"'\"'||to_char(data, 'HH24:MI:SS')::text||'\"'"
|
87
|
+
# "'\"'||to_char(data, 'HH24:MI:SS')::text||'\"'"
|
88
|
+
"'{\"__type__\":\"time\",\"value\":\"'||to_char(data, 'HH24:MI:SS')::text||'\"}'"
|
88
89
|
end
|
89
90
|
simple :timestamp do
|
90
|
-
"extract(epoch from data)::integer::text"
|
91
|
+
# "extract(epoch from data)::integer::text"
|
92
|
+
"'{\"__type__\":\"timestamp\",\"value\":\"'||extract(epoch from data)::integer::text||'\"}'"
|
91
93
|
end
|
92
94
|
|
93
95
|
while composite = ARGV.slice!(0)
|