pg 0.14.0-x86-mingw32 → 0.14.1.pre.363-x86-mingw32
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 +95 -1
- data/History.rdoc +19 -0
- data/ext/extconf.rb +1 -0
- data/ext/pg_connection.c +4 -0
- data/ext/pg_result.c +16 -12
- data/lib/1.8/pg_ext.so +0 -0
- data/lib/1.9/pg_ext.so +0 -0
- data/lib/pg.rb +1 -1
- data/spec/pg/connection_spec.rb +1 -0
- metadata +17 -13
    
        data/ChangeLog
    CHANGED
    
    | @@ -1,8 +1,102 @@ | |
| 1 | 
            +
            2012-08-12  Michael Granger  <ged@FaerieMUD.org>
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            	* History.rdoc, lib/pg.rb:
         | 
| 4 | 
            +
            	Bump the patch version, update history.
         | 
| 5 | 
            +
            	[ef533f731814] [tip]
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            2012-08-08  Jeremy Evans  <code@jeremyevans.net>
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            	* ext/extconf.rb, ext/pg_result.c:
         | 
| 10 | 
            +
            	[PATCH] Recognize PGRES_SINGLE_TUPLE as OK when checking PGresult
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            	From 10cdc23ac4e3cfc91488f3f8a7a44f3275c9fe0a Mon Sep 17 00:00:00
         | 
| 13 | 
            +
            	2001 This is used for the new single row mode introduced in
         | 
| 14 | 
            +
            	9.2beta3, and indicates a successful result when using that mode.
         | 
| 15 | 
            +
            	--- ext/extconf.rb | 1 + ext/pg_result.c | 3 +++ 2 files
         | 
| 16 | 
            +
            	changed, 4 insertions(+), 0 deletions(-)
         | 
| 17 | 
            +
            	[f92b6456c566]
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            2012-08-10  Michael Granger  <ged@FaerieMUD.org>
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            	* ext/pg_result.c:
         | 
| 22 | 
            +
            	Apply the heap vs. stack fix for PG::Result#fields too.
         | 
| 23 | 
            +
            	[512a362e883e]
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            	* ext/pg_result.c:
         | 
| 26 | 
            +
            	Additional fixes for PG::Result#values and #column_values.
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            	- Revert the row-building loop of Result#values to use the heap,
         | 
| 29 | 
            +
            	too.
         | 
| 30 | 
            +
            	- Use the heap for building #column_values, too.
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            	Props to Lars Kanis for figuring out the problem.
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            	Refs #135, #136, #138.
         | 
| 35 | 
            +
            	[62c8ee5406db]
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            	* ext/pg_result.c:
         | 
| 38 | 
            +
            	Use heap instead of stack for result array in #values, etc al. (refs
         | 
| 39 | 
            +
            	#135, #136, #138)
         | 
| 40 | 
            +
            	[4d5e457062e8]
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            2012-08-04  Lars Kanis  <kanis@comcard.de>
         | 
| 43 | 
            +
             | 
| 44 | 
            +
            	* spec/pg/connection_spec.rb:
         | 
| 45 | 
            +
            	Add missing require for using the TCPServer in connection_spec. This
         | 
| 46 | 
            +
            	fixes #137 .
         | 
| 47 | 
            +
            	[72b45840d975]
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            2012-07-03  Lars Kanis  <kanis@comcard.de>
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            	* ext/pg_connection.c:
         | 
| 52 | 
            +
            	Add note about the usage scope of the result object received by the
         | 
| 53 | 
            +
            	#set_notice_receiver block.
         | 
| 54 | 
            +
            	[de900bfaff1a]
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            2012-07-02  Lars Kanis  <kanis@comcard.de>
         | 
| 57 | 
            +
             | 
| 58 | 
            +
            	* ext/pg_connection.c, spec/pg/connection_spec.rb:
         | 
| 59 | 
            +
            	Fix encoding of values delivered to the row processor and add specs
         | 
| 60 | 
            +
            	for binary and text data.
         | 
| 61 | 
            +
            	[bb9c6625fbc9] <row_processor>
         | 
| 62 | 
            +
             | 
| 63 | 
            +
            	* ext/pg_connection.c:
         | 
| 64 | 
            +
            	Polish the documentation a little bit
         | 
| 65 | 
            +
            	[b7633be3c941] <row_processor>
         | 
| 66 | 
            +
             | 
| 67 | 
            +
            	* ext/pg_result.c:
         | 
| 68 | 
            +
            	Add PGRES_COPY_BOTH to documentation of PG::Result#result_status
         | 
| 69 | 
            +
            	[5e0e06440b1a]
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            2012-07-01  Lars Kanis  <kanis@comcard.de>
         | 
| 72 | 
            +
             | 
| 73 | 
            +
            	* ext/pg_connection.c:
         | 
| 74 | 
            +
            	Get rid of gcc warning about (non-)const PGresult to
         | 
| 75 | 
            +
            	pg_new_result_for_callback()
         | 
| 76 | 
            +
            	[1a25786ed8f3] <row_processor>
         | 
| 77 | 
            +
             | 
| 78 | 
            +
            	* ext/pg_connection.c, spec/pg/connection_spec.rb:
         | 
| 79 | 
            +
            	Fix wrong encoding for Result object passed to a notice-receiver
         | 
| 80 | 
            +
            	block. Add proper specs for #set_notice_receiver.
         | 
| 81 | 
            +
            	[4280826bb9b9] <row_processor>
         | 
| 82 | 
            +
             | 
| 83 | 
            +
            	* ext/extconf.rb, ext/pg.h, ext/pg_connection.c, ext/pg_result.c,
         | 
| 84 | 
            +
            	spec/lib/helpers.rb, spec/pg/connection_spec.rb:
         | 
| 85 | 
            +
            	Implement PostgreSQL-9.2 functions PG::Connection#set_row_processor,
         | 
| 86 | 
            +
            	get_row_processor, skip_result
         | 
| 87 | 
            +
            	[b7ce4843f4d1] <row_processor>
         | 
| 88 | 
            +
             | 
| 89 | 
            +
            2012-06-28  Lars Kanis  <kanis@comcard.de>
         | 
| 90 | 
            +
             | 
| 91 | 
            +
            	* ext/pg_result.c:
         | 
| 92 | 
            +
            	Add PGRES_COPY_BOTH to documentation of PG::Result#result_status
         | 
| 93 | 
            +
            	[63998b47da6e] <copy_both_docu>
         | 
| 94 | 
            +
             | 
| 1 95 | 
             
            2012-06-23  Michael Granger  <ged@FaerieMUD.org>
         | 
| 2 96 |  | 
| 3 97 | 
             
            	* .hgtags:
         | 
| 4 98 | 
             
            	Added tag v0.14.0 for changeset 634e0a42a101
         | 
| 5 | 
            -
            	[35eecb26bd34] | 
| 99 | 
            +
            	[35eecb26bd34]
         | 
| 6 100 |  | 
| 7 101 | 
             
            	* .hgsigs:
         | 
| 8 102 | 
             
            	Added signature for changeset a45710f8db30
         | 
    
        data/History.rdoc
    CHANGED
    
    | @@ -1,3 +1,22 @@ | |
| 1 | 
            +
            == v0.14.1 [2012-08-12] Michael Granger <ged@FaerieMUD.org>
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Important bugfix:
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            - Fix stack overflow bug in PG::Result#values and #column_values (#135). Thanks
         | 
| 6 | 
            +
              to everyone who reported the bug, and Lars Kanis especially for figuring out
         | 
| 7 | 
            +
              the problem.
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            PostgreSQL 9.2 beta fixes:
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            - Recognize PGRES_SINGLE_TUPLE as OK when checking PGresult (Jeremy Evans)
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            Documentation fixes:
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            - Add note about the usage scope of the result object received by the
         | 
| 16 | 
            +
              #set_notice_receiver block. (Lars Kanis)
         | 
| 17 | 
            +
            - Add PGRES_COPY_BOTH to documentation of PG::Result#result_status. (Lars Kanis)
         | 
| 18 | 
            +
             | 
| 19 | 
            +
             | 
| 1 20 | 
             
            == v0.14.0 [2012-06-17] Michael Granger <ged@FaerieMUD.org>
         | 
| 2 21 |  | 
| 3 22 | 
             
            Bugfixes:
         | 
    
        data/ext/extconf.rb
    CHANGED
    
    | @@ -70,6 +70,7 @@ have_func 'rb_encdb_alias' | |
| 70 70 | 
             
            have_func 'rb_enc_alias'
         | 
| 71 71 |  | 
| 72 72 | 
             
            have_const 'PGRES_COPY_BOTH', 'libpq-fe.h'
         | 
| 73 | 
            +
            have_const 'PGRES_SINGLE_TUPLE', 'libpq-fe.h'
         | 
| 73 74 |  | 
| 74 75 | 
             
            $defs.push( "-DHAVE_ST_NOTIFY_EXTRA" ) if
         | 
| 75 76 | 
             
            	have_struct_member 'struct pgNotify', 'extra', 'libpq-fe.h'
         | 
    
        data/ext/pg_connection.c
    CHANGED
    
    | @@ -2325,6 +2325,10 @@ notice_receiver_proxy(void *arg, const PGresult *result) | |
| 2325 2325 | 
             
             * the Proc object previously set, or +nil+ if it was previously the default.
         | 
| 2326 2326 | 
             
             *
         | 
| 2327 2327 | 
             
             * If you pass no arguments, it will reset the handler to the default.
         | 
| 2328 | 
            +
             *
         | 
| 2329 | 
            +
             * *Note:* The +result+ passed to the block should not be used outside
         | 
| 2330 | 
            +
             * of the block, since the corresponding C object could be freed after the
         | 
| 2331 | 
            +
             * block finishes.
         | 
| 2328 2332 | 
             
             */
         | 
| 2329 2333 | 
             
            static VALUE
         | 
| 2330 2334 | 
             
            pgconn_set_notice_receiver(VALUE self)
         | 
    
        data/ext/pg_result.c
    CHANGED
    
    | @@ -67,6 +67,9 @@ pg_result_check( VALUE self ) | |
| 67 67 | 
             
            		case PGRES_COPY_IN:
         | 
| 68 68 | 
             
            #ifdef HAVE_CONST_PGRES_COPY_BOTH
         | 
| 69 69 | 
             
            		case PGRES_COPY_BOTH:
         | 
| 70 | 
            +
            #endif
         | 
| 71 | 
            +
            #ifdef HAVE_CONST_PGRES_SINGLE_TUPLE
         | 
| 72 | 
            +
            		case PGRES_SINGLE_TUPLE:
         | 
| 70 73 | 
             
            #endif
         | 
| 71 74 | 
             
            		case PGRES_EMPTY_QUERY:
         | 
| 72 75 | 
             
            		case PGRES_COMMAND_OK:
         | 
| @@ -179,6 +182,7 @@ pgresult_get(VALUE self) | |
| 179 182 | 
             
             * * +PGRES_BAD_RESPONSE+
         | 
| 180 183 | 
             
             * * +PGRES_NONFATAL_ERROR+
         | 
| 181 184 | 
             
             * * +PGRES_FATAL_ERROR+
         | 
| 185 | 
            +
             * * +PGRES_COPY_BOTH+
         | 
| 182 186 | 
             
             */
         | 
| 183 187 | 
             
            static VALUE
         | 
| 184 188 | 
             
            pgresult_result_status(VALUE self)
         | 
| @@ -725,15 +729,15 @@ pgresult_values(VALUE self) | |
| 725 729 | 
             
            	int field;
         | 
| 726 730 | 
             
            	int num_rows = PQntuples(result);
         | 
| 727 731 | 
             
            	int num_fields = PQnfields(result);
         | 
| 728 | 
            -
            	VALUE  | 
| 732 | 
            +
            	VALUE ary = rb_ary_new2(num_rows);
         | 
| 729 733 |  | 
| 730 734 | 
             
            	for ( row = 0; row < num_rows; row++ ) {
         | 
| 731 | 
            -
            		VALUE new_row | 
| 735 | 
            +
            		VALUE new_row = rb_ary_new2(num_fields);
         | 
| 732 736 |  | 
| 733 737 | 
             
            		/* populate the row */
         | 
| 734 738 | 
             
            		for ( field = 0; field < num_fields; field++ ) {
         | 
| 735 739 | 
             
            			if ( PQgetisnull(result, row, field) ) {
         | 
| 736 | 
            -
            				new_row | 
| 740 | 
            +
            				rb_ary_store( new_row, field, Qnil );
         | 
| 737 741 | 
             
            			}
         | 
| 738 742 | 
             
            			else {
         | 
| 739 743 | 
             
            				VALUE val = rb_tainted_str_new( PQgetvalue(result, row, field), 
         | 
| @@ -747,14 +751,14 @@ pgresult_values(VALUE self) | |
| 747 751 | 
             
            					rb_enc_associate( val, rb_ascii8bit_encoding() );
         | 
| 748 752 | 
             
            				}
         | 
| 749 753 | 
             
            #endif
         | 
| 750 | 
            -
            				new_row | 
| 754 | 
            +
            				rb_ary_store( new_row, field, val );
         | 
| 751 755 | 
             
            			}
         | 
| 752 756 | 
             
            		}
         | 
| 753 757 |  | 
| 754 | 
            -
            		 | 
| 758 | 
            +
            		rb_ary_store( ary, row, new_row );
         | 
| 755 759 | 
             
            	}
         | 
| 756 760 |  | 
| 757 | 
            -
            	return  | 
| 761 | 
            +
            	return ary;
         | 
| 758 762 | 
             
            }
         | 
| 759 763 |  | 
| 760 764 |  | 
| @@ -769,7 +773,7 @@ make_column_result_array( VALUE self, int col ) | |
| 769 773 | 
             
            	int rows = PQntuples( result );
         | 
| 770 774 | 
             
            	int i;
         | 
| 771 775 | 
             
            	VALUE val = Qnil;
         | 
| 772 | 
            -
            	VALUE results | 
| 776 | 
            +
            	VALUE results = rb_ary_new2( rows );
         | 
| 773 777 |  | 
| 774 778 | 
             
            	if ( col >= PQnfields(result) )
         | 
| 775 779 | 
             
            		rb_raise( rb_eIndexError, "no column %d in result", col );
         | 
| @@ -787,10 +791,10 @@ make_column_result_array( VALUE self, int col ) | |
| 787 791 | 
             
            		}
         | 
| 788 792 | 
             
            #endif
         | 
| 789 793 |  | 
| 790 | 
            -
            		results | 
| 794 | 
            +
            		rb_ary_store( results, i, val );
         | 
| 791 795 | 
             
            	}
         | 
| 792 796 |  | 
| 793 | 
            -
            	return  | 
| 797 | 
            +
            	return results;
         | 
| 794 798 | 
             
            }
         | 
| 795 799 |  | 
| 796 800 |  | 
| @@ -860,16 +864,16 @@ pgresult_fields(VALUE self) | |
| 860 864 | 
             
            {
         | 
| 861 865 | 
             
            	PGresult *result = pgresult_get( self );
         | 
| 862 866 | 
             
            	int n = PQnfields( result );
         | 
| 863 | 
            -
            	VALUE fields | 
| 867 | 
            +
            	VALUE fields = rb_ary_new2( n );
         | 
| 864 868 | 
             
            	int i;
         | 
| 865 869 |  | 
| 866 870 | 
             
            	for ( i = 0; i < n; i++ ) {
         | 
| 867 871 | 
             
            		VALUE val = rb_tainted_str_new2(PQfname(result, i));
         | 
| 868 872 | 
             
            		ASSOCIATE_INDEX(val, self);
         | 
| 869 | 
            -
            		fields | 
| 873 | 
            +
            		rb_ary_store( fields, i, val );
         | 
| 870 874 | 
             
            	}
         | 
| 871 875 |  | 
| 872 | 
            -
            	return  | 
| 876 | 
            +
            	return fields;
         | 
| 873 877 | 
             
            }
         | 
| 874 878 |  | 
| 875 879 |  | 
    
        data/lib/1.8/pg_ext.so
    CHANGED
    
    | Binary file | 
    
        data/lib/1.9/pg_ext.so
    CHANGED
    
    | Binary file | 
    
        data/lib/pg.rb
    CHANGED
    
    
    
        data/spec/pg/connection_spec.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,15 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: pg
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 5 | 
            -
              prerelease: 
         | 
| 4 | 
            +
              hash: 1923832471
         | 
| 5 | 
            +
              prerelease: 7
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 14
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
               | 
| 9 | 
            +
              - 1
         | 
| 10 | 
            +
              - pre
         | 
| 11 | 
            +
              - 363
         | 
| 12 | 
            +
              version: 0.14.1.pre.363
         | 
| 11 13 | 
             
            platform: x86-mingw32
         | 
| 12 14 | 
             
            authors: 
         | 
| 13 15 | 
             
            - Michael Granger
         | 
| @@ -15,7 +17,7 @@ autorequire: | |
| 15 17 | 
             
            bindir: bin
         | 
| 16 18 | 
             
            cert_chain: []
         | 
| 17 19 |  | 
| 18 | 
            -
            date: 2012- | 
| 20 | 
            +
            date: 2012-08-14 00:00:00 Z
         | 
| 19 21 | 
             
            dependencies: 
         | 
| 20 22 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 21 23 | 
             
              name: hoe-mercurial
         | 
| @@ -25,12 +27,12 @@ dependencies: | |
| 25 27 | 
             
                requirements: 
         | 
| 26 28 | 
             
                - - ~>
         | 
| 27 29 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 28 | 
            -
                    hash:  | 
| 30 | 
            +
                    hash: 7
         | 
| 29 31 | 
             
                    segments: 
         | 
| 30 32 | 
             
                    - 1
         | 
| 31 | 
            -
                    -  | 
| 32 | 
            -
                    -  | 
| 33 | 
            -
                    version: 1. | 
| 33 | 
            +
                    - 4
         | 
| 34 | 
            +
                    - 0
         | 
| 35 | 
            +
                    version: 1.4.0
         | 
| 34 36 | 
             
              type: :development
         | 
| 35 37 | 
             
              version_requirements: *id001
         | 
| 36 38 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -214,12 +216,14 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 214 216 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 215 217 | 
             
              none: false
         | 
| 216 218 | 
             
              requirements: 
         | 
| 217 | 
            -
              - - " | 
| 219 | 
            +
              - - ">"
         | 
| 218 220 | 
             
                - !ruby/object:Gem::Version 
         | 
| 219 | 
            -
                  hash:  | 
| 221 | 
            +
                  hash: 25
         | 
| 220 222 | 
             
                  segments: 
         | 
| 221 | 
            -
                  -  | 
| 222 | 
            -
                   | 
| 223 | 
            +
                  - 1
         | 
| 224 | 
            +
                  - 3
         | 
| 225 | 
            +
                  - 1
         | 
| 226 | 
            +
                  version: 1.3.1
         | 
| 223 227 | 
             
            requirements: []
         | 
| 224 228 |  | 
| 225 229 | 
             
            rubyforge_project: pg
         |