pgsql 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/conn.c +3 -3
- data/lib/conn_quote.c +3 -12
- data/lib/module.c +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09bfda9c735da18dfbd986a66e29ad0fb7d7a89257e47fe2696094e6deb6d012'
|
4
|
+
data.tar.gz: ffb57400fdf3a67e777a76f8070d85c785bd3a588679da9316e620c96460ff84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eda3796cb0d7604b3e2119d08f6cea4cee5d1a1455ceee2fa018fbbc5a9426f88d97ffd1714e9d01879fd6b5fadbafe2eb23b4b60b959f85d7a85c73aa9311e1
|
7
|
+
data.tar.gz: b9cd0c5e075530a708bca6956977dfd7482b3e478186fb1bc169633ce1d4fcbf8f02f88668a3dcca3552103c545f0c1a19d6d89190cfd5441ed7a7d4cbce51aa
|
data/lib/conn.c
CHANGED
@@ -166,7 +166,7 @@ pgconn_mkstring( struct pgconn_data *ptr, const char *str)
|
|
166
166
|
VALUE r;
|
167
167
|
|
168
168
|
if (str) {
|
169
|
-
r =
|
169
|
+
r = rb_str_new2( str);
|
170
170
|
pgconn_encode_out4in( ptr, r);
|
171
171
|
} else
|
172
172
|
r = Qnil;
|
@@ -179,7 +179,7 @@ pgconn_mkstringn( struct pgconn_data *ptr, const char *str, int len)
|
|
179
179
|
VALUE r;
|
180
180
|
|
181
181
|
if (str) {
|
182
|
-
r =
|
182
|
+
r = rb_str_new( str, len);
|
183
183
|
pgconn_encode_out4in( ptr, r);
|
184
184
|
} else
|
185
185
|
r = Qnil;
|
@@ -438,7 +438,7 @@ pgconn_client_encoding( VALUE self)
|
|
438
438
|
{
|
439
439
|
char *encoding = (char *) pg_encoding_to_char(
|
440
440
|
PQclientEncoding( get_pgconn( self)->conn));
|
441
|
-
return
|
441
|
+
return rb_str_new2( encoding);
|
442
442
|
}
|
443
443
|
|
444
444
|
/*
|
data/lib/conn_quote.c
CHANGED
@@ -159,7 +159,6 @@ pgconn_escape_bytea( VALUE self, VALUE str)
|
|
159
159
|
(unsigned char *) RSTRING_PTR( str), RSTRING_LEN( str), &l);
|
160
160
|
ret = rb_str_new( (char *) s, l - 1);
|
161
161
|
PQfreemem( s);
|
162
|
-
OBJ_INFECT( ret, str);
|
163
162
|
return ret;
|
164
163
|
}
|
165
164
|
|
@@ -216,7 +215,6 @@ pgconn_unescape_bytea( VALUE self, VALUE obj)
|
|
216
215
|
rb_enc_associate( ret, rb_to_encoding( enc));
|
217
216
|
#endif
|
218
217
|
|
219
|
-
OBJ_INFECT( ret, obj);
|
220
218
|
return ret;
|
221
219
|
}
|
222
220
|
|
@@ -285,10 +283,9 @@ pgconn_stringize( VALUE self, VALUE obj)
|
|
285
283
|
VALUE co;
|
286
284
|
|
287
285
|
co = CLASS_OF( obj);
|
288
|
-
if (co == rb_cTime)
|
286
|
+
if (co == rb_cTime)
|
289
287
|
result = rb_funcall( obj, id_iso8601, 0);
|
290
|
-
|
291
|
-
} else if (co == rb_cDate)
|
288
|
+
else if (co == rb_cDate)
|
292
289
|
result = rb_obj_as_string( obj);
|
293
290
|
else if (co == rb_cDateTime)
|
294
291
|
result = rb_obj_as_string( obj);
|
@@ -298,7 +295,6 @@ pgconn_stringize( VALUE self, VALUE obj)
|
|
298
295
|
else if (rb_respond_to( obj, id_to_postgres)) {
|
299
296
|
result = rb_funcall( obj, id_to_postgres, 0);
|
300
297
|
StringValue( result);
|
301
|
-
OBJ_INFECT( result, obj);
|
302
298
|
} else
|
303
299
|
result = rb_obj_as_string( obj);
|
304
300
|
}
|
@@ -428,10 +424,8 @@ stringize_array( VALUE self, VALUE result, VALUE ary)
|
|
428
424
|
rb_str_buf_cat2( result, ",");
|
429
425
|
}
|
430
426
|
r = pgconn_stringize( self, *o);
|
431
|
-
if (!NIL_P( *o))
|
427
|
+
if (!NIL_P( *o))
|
432
428
|
r = dquote_string( r);
|
433
|
-
OBJ_INFECT( result, *o);
|
434
|
-
}
|
435
429
|
rb_str_buf_append( result, r);
|
436
430
|
}
|
437
431
|
return result;
|
@@ -542,7 +536,6 @@ VALUE pgconn_quote( VALUE self, VALUE obj)
|
|
542
536
|
rb_str_buf_cat2( res, "::");
|
543
537
|
rb_str_buf_cat2( res, type);
|
544
538
|
}
|
545
|
-
OBJ_INFECT( res, obj);
|
546
539
|
}
|
547
540
|
break;
|
548
541
|
}
|
@@ -578,7 +571,6 @@ quote_string( VALUE conn, VALUE str)
|
|
578
571
|
res = rb_str_new2( p);
|
579
572
|
PQfreemem( p);
|
580
573
|
rb_enc_associate( res, rb_enc_get( str));
|
581
|
-
OBJ_INFECT( res, str);
|
582
574
|
return res;
|
583
575
|
}
|
584
576
|
|
@@ -643,7 +635,6 @@ pgconn_quote_identifier( VALUE self, VALUE str)
|
|
643
635
|
res = rb_str_new2( p);
|
644
636
|
PQfreemem( p);
|
645
637
|
rb_enc_associate( res, rb_enc_get( str));
|
646
|
-
OBJ_INFECT( res, str);
|
647
638
|
return res;
|
648
639
|
}
|
649
640
|
|
data/lib/module.c
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgsql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autorake
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
requirements:
|
75
75
|
- PostgreSQL
|
76
|
-
rubygems_version: 3.
|
76
|
+
rubygems_version: 3.4.17
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: PostgreSQL-API for Ruby
|