pgsql 1.3 → 1.4
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.
- checksums.yaml +5 -13
- data/LICENSE +1 -1
- data/lib/conn.c +7 -1
- data/lib/conn_exec.c +2 -2
- data/lib/conn_quote.c +5 -3
- data/lib/module.c +2 -1
- data/lib/result.c +3 -3
- metadata +26 -30
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YWVlZTViMjA4YmYwYzg2MjVlYWYwNjdjNTA1N2ExMmRlMDU5MTY3MA==
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cd9c6d654678f0a738b6607d7f9fb8edc562d7634a099c5d246105d24bd8c5ee
|
4
|
+
data.tar.gz: d6430b794796c7d6fd068b40084d01dac66469149a5c54ac3b5b8477daaaafa3
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MDg2YzdlMmVkZDAzZjZiY2RmOWFkNTgyZTFjNzQxMTM1ZjRhN2ExNmU4OWEx
|
11
|
-
MmQzZTAwOGI4NGNkZmNhNDQyMGNhM2Y3Yjg0ODNlNDQxODFmNTg=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YTc3ZWJkMDg0MWUwYjdhZDdkMGViMDM5MzE5YmU2MGVmZTBkYTNlMGIwNWZh
|
14
|
-
YzQwN2Y4ZjQ0ZjE2Yjk4OWI1OTFmMzY4NGVjNmY5NDk2MjIzYTIyMzc5MWI0
|
15
|
-
ODFiNTRjMjBkN2YxNDljN2FlYWJmOWUzMDQwMDE1ODAyYWQyZGY=
|
6
|
+
metadata.gz: 92df57a64ecd2bf7a09f28f2de2f0403b215d19883f259cf0c275fd2f8df9aa7fbdd853ef63b11ee658fd960a475b5c9352f93ab8a9a29fc4b600d84619b41d3
|
7
|
+
data.tar.gz: 987b07b360cd45b8e112f12a4240b6269554758904cb2076a9574afb03448311a44da6deffd0177b18202b6f1ce2135a4ecac08ac529accbd7435ca352a37243
|
data/LICENSE
CHANGED
data/lib/conn.c
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
|
6
6
|
#include "conn.h"
|
7
7
|
|
8
|
+
#include "conn_quote.h"
|
9
|
+
#include "conn_exec.h"
|
8
10
|
|
9
11
|
#if defined( HAVE_HEADER_ST_H)
|
10
12
|
#include <st.h>
|
@@ -454,7 +456,7 @@ pgconn_set_client_encoding( VALUE self, VALUE str)
|
|
454
456
|
{
|
455
457
|
StringValue( str);
|
456
458
|
if ((PQsetClientEncoding( get_pgconn( self)->conn, RSTRING_PTR( str))) == -1)
|
457
|
-
rb_raise( rb_ePgError, "Invalid encoding name %s", str);
|
459
|
+
rb_raise( rb_ePgError, "Invalid encoding name %s", RSTRING_PTR( str));
|
458
460
|
return Qnil;
|
459
461
|
}
|
460
462
|
|
@@ -491,6 +493,8 @@ pgconn_set_externalenc( VALUE self, VALUE enc)
|
|
491
493
|
e = NIL_P( enc) ? rb_to_encoding( enc) : rb_default_external_encoding();
|
492
494
|
Data_Get_Struct( self, struct pgconn_data, c);
|
493
495
|
c->external = rb_enc_from_encoding( e);
|
496
|
+
|
497
|
+
return Qnil;
|
494
498
|
}
|
495
499
|
|
496
500
|
/*
|
@@ -523,6 +527,8 @@ pgconn_set_internalenc( VALUE self, VALUE enc)
|
|
523
527
|
e = NIL_P( enc) ? rb_to_encoding( enc) : rb_default_internal_encoding();
|
524
528
|
Data_Get_Struct( self, struct pgconn_data, c);
|
525
529
|
c->internal = rb_enc_from_encoding( e);
|
530
|
+
|
531
|
+
return Qnil;
|
526
532
|
}
|
527
533
|
|
528
534
|
#endif
|
data/lib/conn_exec.c
CHANGED
@@ -69,7 +69,7 @@ static ID id_to_a;
|
|
69
69
|
void
|
70
70
|
pg_raise_connexec( struct pgconn_data *c)
|
71
71
|
{
|
72
|
-
rb_raise( rb_ePgConnExec, PQerrorMessage( c->conn));
|
72
|
+
rb_raise( rb_ePgConnExec, "%s", PQerrorMessage( c->conn));
|
73
73
|
}
|
74
74
|
|
75
75
|
|
@@ -144,7 +144,7 @@ params_to_strings( VALUE conn, VALUE params, int *len)
|
|
144
144
|
|
145
145
|
q = pgconn_destring( c, pgconn_stringize( conn, *ptr), &n);
|
146
146
|
a = ALLOC_N( char, n + 1);
|
147
|
-
for (p = a; *p = n ? *q : '\0'; ++p, ++q, --n)
|
147
|
+
for (p = a; (*p = n ? *q : '\0'); ++p, ++q, --n)
|
148
148
|
;
|
149
149
|
*v = a;
|
150
150
|
}
|
data/lib/conn_quote.c
CHANGED
@@ -55,7 +55,7 @@ static VALUE pg_escape_regex;
|
|
55
55
|
VALUE
|
56
56
|
pg_currency_class( void)
|
57
57
|
{
|
58
|
-
if (NIL_P( rb_cCurrency)
|
58
|
+
if (id_currency && NIL_P( rb_cCurrency)) {
|
59
59
|
if (rb_const_defined( rb_cObject, id_currency))
|
60
60
|
rb_cCurrency = rb_const_get( rb_cObject, id_currency);
|
61
61
|
id_currency = 0;
|
@@ -121,7 +121,7 @@ VALUE
|
|
121
121
|
pgconn_escape_bytea( VALUE self, VALUE str)
|
122
122
|
{
|
123
123
|
unsigned char *s;
|
124
|
-
|
124
|
+
size_t l;
|
125
125
|
VALUE ret;
|
126
126
|
|
127
127
|
if (NIL_P( str))
|
@@ -453,7 +453,9 @@ gsub_escape_i( VALUE c, VALUE arg)
|
|
453
453
|
* Call Pg::Conn#escape_bytea first if you want to tell your string is a byte
|
454
454
|
* array and the quote that result.
|
455
455
|
*/
|
456
|
-
VALUE pgconn_quote( VALUE self, VALUE obj)
|
456
|
+
VALUE pgconn_quote( VALUE self, VALUE obj)
|
457
|
+
{
|
458
|
+
VALUE o, res;
|
457
459
|
|
458
460
|
o = rb_funcall( self, id_format, 1, obj);
|
459
461
|
if (!NIL_P( o))
|
data/lib/module.c
CHANGED
data/lib/result.c
CHANGED
@@ -280,8 +280,8 @@ pgresult_clear( VALUE self)
|
|
280
280
|
|
281
281
|
Data_Get_Struct( self, struct pgresult_data, r);
|
282
282
|
if (r->res != NULL) {
|
283
|
-
|
284
|
-
|
283
|
+
PQclear( r->res);
|
284
|
+
r->res = NULL;
|
285
285
|
}
|
286
286
|
return Qnil;
|
287
287
|
}
|
@@ -513,7 +513,7 @@ pg_fetchrow( struct pgresult_data *r, int num)
|
|
513
513
|
n = PQnfields( r->res);
|
514
514
|
if (num < PQntuples( r->res)) {
|
515
515
|
row = rb_ary_new2( n);
|
516
|
-
for (i = 0
|
516
|
+
for (i = 0; n; ++i, --n)
|
517
517
|
rb_ary_store( row, i, pg_fetchresult( r, num, i));
|
518
518
|
} else
|
519
519
|
row = Qnil;
|
metadata
CHANGED
@@ -1,38 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgsql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.4'
|
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: 2019-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autorake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
-
description:
|
28
|
-
by Guy
|
29
|
-
|
30
|
-
Decoux. As the project wasn''t maintained a long time after Guy''s decease, I
|
31
|
-
|
27
|
+
description: |
|
28
|
+
This is not the official PostgreSQL library that was originally written by Guy
|
29
|
+
Decoux. As the project wasn't maintained a long time after Guy's decease, I
|
32
30
|
decided to fork my own project.
|
33
|
-
|
34
|
-
'
|
35
|
-
email: <software@bertram-scharpf.de>
|
31
|
+
email: "<software@bertram-scharpf.de>"
|
36
32
|
executables: []
|
37
33
|
extensions:
|
38
34
|
- lib/mkrf_conf
|
@@ -40,46 +36,46 @@ extra_rdoc_files:
|
|
40
36
|
- README
|
41
37
|
- LICENSE
|
42
38
|
files:
|
39
|
+
- LICENSE
|
40
|
+
- README
|
43
41
|
- lib/Rakefile
|
44
|
-
- lib/mkrf_conf
|
45
|
-
- lib/undef.h
|
46
|
-
- lib/module.h
|
47
|
-
- lib/module.c
|
48
|
-
- lib/conn.h
|
49
42
|
- lib/conn.c
|
50
|
-
- lib/
|
51
|
-
- lib/conn_quote.c
|
52
|
-
- lib/conn_exec.h
|
43
|
+
- lib/conn.h
|
53
44
|
- lib/conn_exec.c
|
54
|
-
- lib/
|
45
|
+
- lib/conn_exec.h
|
46
|
+
- lib/conn_quote.c
|
47
|
+
- lib/conn_quote.h
|
48
|
+
- lib/mkrf_conf
|
49
|
+
- lib/module.c
|
50
|
+
- lib/module.h
|
55
51
|
- lib/result.c
|
56
|
-
-
|
57
|
-
-
|
52
|
+
- lib/result.h
|
53
|
+
- lib/undef.h
|
58
54
|
homepage: http://www.bertram-scharpf.de/software/pgsql
|
59
|
-
licenses:
|
55
|
+
licenses:
|
56
|
+
- BSD-2-Clause
|
60
57
|
metadata: {}
|
61
58
|
post_install_message:
|
62
59
|
rdoc_options:
|
63
|
-
- --charset
|
60
|
+
- "--charset"
|
64
61
|
- utf-8
|
65
|
-
- --main
|
62
|
+
- "--main"
|
66
63
|
- README
|
67
64
|
require_paths:
|
68
65
|
- lib
|
69
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
67
|
requirements:
|
71
|
-
- -
|
68
|
+
- - ">="
|
72
69
|
- !ruby/object:Gem::Version
|
73
70
|
version: '0'
|
74
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
72
|
requirements:
|
76
|
-
- -
|
73
|
+
- - ">="
|
77
74
|
- !ruby/object:Gem::Version
|
78
75
|
version: '0'
|
79
76
|
requirements:
|
80
77
|
- PostgreSQL
|
81
|
-
|
82
|
-
rubygems_version: 2.1.11
|
78
|
+
rubygems_version: 3.0.6
|
83
79
|
signing_key:
|
84
80
|
specification_version: 4
|
85
81
|
summary: PostgreSQL-API for Ruby
|