sequel_pg 1.6.1-x86-mswin32-60 → 1.6.4-x86-mswin32-60

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.
data/CHANGELOG CHANGED
@@ -1,3 +1,15 @@
1
+ === 1.6.4 (2013-01-14)
2
+
3
+ * Remove type conversion of int2vector and money types on PostgreSQL, since previous conversions were wrong (jeremyevans) (#8)
4
+
5
+ === 1.6.3 (2012-11-30)
6
+
7
+ * Make streaming support not swallow errors when rows are not retrieved (jeremyevans)
8
+
9
+ === 1.6.2 (2012-11-16)
10
+
11
+ * Make sequel_pg runnable on rubinius by fixing bad rb_global_variable call (dbussink) (#7)
12
+
1
13
  === 1.6.1 (2012-10-25)
2
14
 
3
15
  * Make PostgreSQL array parser handle string encodings correctly on ruby 1.9 (jeremyevans)
@@ -56,9 +68,9 @@
56
68
 
57
69
  * Build the Windows gem against PostgreSQL 9.0.1 to support the new default bytea serialization format (jeremyevans)
58
70
 
59
- * Allow use of Sequel::Postgres::PG_TYPES to add custom conversion support for types not handled by default (funny-falcon)
71
+ * Allow use of Sequel::Postgres::PG_TYPES to add custom conversion support for types not handled by default (funny-falcon) (#2)
60
72
 
61
- * Fix handling of timestamps with fractional seconds and offsets (funny-falcon)
73
+ * Fix handling of timestamps with fractional seconds and offsets (funny-falcon) (#1)
62
74
 
63
75
  === 1.0.1 (2010-09-12)
64
76
 
data/README.rdoc CHANGED
@@ -157,6 +157,8 @@ sequel_pg has been tested on the following:
157
157
  * ruby 1.8.7
158
158
  * ruby 1.9.2
159
159
  * ruby 1.9.3
160
+ * ruby 2.0.0preview1
161
+ * rbx 1.2.4
160
162
 
161
163
  If your platform, compiler version, or ruby version is not listed
162
164
  above, please test and send me a report including:
@@ -454,7 +454,6 @@ static VALUE spg__col_value(VALUE self, PGresult *res, long i, long j, VALUE* co
454
454
  break;
455
455
  case 20: /* integer */
456
456
  case 21:
457
- case 22:
458
457
  case 23:
459
458
  case 26:
460
459
  rv = rb_cstr2inum(v, 10);
@@ -471,8 +470,7 @@ static VALUE spg__col_value(VALUE self, PGresult *res, long i, long j, VALUE* co
471
470
  rv = rb_float_new(rb_cstr_to_dbl(v, Qfalse));
472
471
  }
473
472
  break;
474
- case 790: /* numeric */
475
- case 1700:
473
+ case 1700: /* numeric */
476
474
  rv = rb_funcall(spg_BigDecimal, spg_id_new, 1, rb_str_new(v, PQgetlength(res, i, j)));
477
475
  break;
478
476
  case 1082: /* date */
@@ -932,11 +930,30 @@ static VALUE spg__yield_each_row(VALUE self) {
932
930
  static VALUE spg__flush_results(VALUE rconn) {
933
931
  PGconn *conn;
934
932
  PGresult *res;
933
+ VALUE error = 0;
935
934
  Data_Get_Struct(rconn, PGconn, conn);
936
935
 
937
936
  while ((res = PQgetResult(conn)) != NULL) {
937
+ if (!error) {
938
+ switch (PQresultStatus(res))
939
+ {
940
+ case PGRES_BAD_RESPONSE:
941
+ case PGRES_FATAL_ERROR:
942
+ case PGRES_NONFATAL_ERROR:
943
+ error = rb_str_new2(PQresultErrorMessage(res));
944
+ break;
945
+ default:
946
+ break;
947
+ }
948
+ }
938
949
  PQclear(res);
939
950
  }
951
+
952
+ if (error) {
953
+ VALUE exception = rb_exc_new3(spg_PGError, error);
954
+ rb_iv_set(exception, "@connection", rconn);
955
+ rb_exc_raise(exception);
956
+ }
940
957
 
941
958
  return rconn;
942
959
  }
@@ -1009,7 +1026,7 @@ void Init_sequel_pg(void) {
1009
1026
  rb_global_variable(&spg_BigDecimal);
1010
1027
  rb_global_variable(&spg_Date);
1011
1028
  rb_global_variable(&spg_SQLTime);
1012
- rb_global_variable(&spg_Postgres);
1029
+ rb_global_variable(&spg_PGError);
1013
1030
  rb_global_variable(&spg_nan);
1014
1031
  rb_global_variable(&spg_pos_inf);
1015
1032
  rb_global_variable(&spg_neg_inf);
data/lib/1.8/sequel_pg.so CHANGED
Binary file
data/lib/1.9/sequel_pg.so CHANGED
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_pg
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 1
10
- version: 1.6.1
9
+ - 4
10
+ version: 1.6.4
11
11
  platform: x86-mswin32-60
12
12
  authors:
13
13
  - Jeremy Evans
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-28 00:00:00 Z
18
+ date: 2012-12-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: pg