# HG changeset patch # User Michael Granger # Date 1351634653 25200 # Node ID 10804d14d1e7ccf9b265cd08a6e28853a1a60c66 # Parent 994bad887ae9a963ef4cedf47aaa470da6a9e825 Adding some fixes for PostgreSQL 9.2.x diff -r 994bad887ae9a963ef4cedf47aaa470da6a9e825 -r 10804d14d1e7ccf9b265cd08a6e28853a1a60c66 spec/lib/helpers.rb --- a/spec/lib/helpers.rb Tue Oct 30 15:03:28 2012 -0700 +++ b/spec/lib/helpers.rb Tue Oct 30 15:04:13 2012 -0700 @@ -243,7 +243,10 @@ config.filter_run_excluding :postgresql_90 unless PG::Connection.instance_methods.map( &:to_sym ).include?( :escape_literal ) - config.filter_run_excluding :postgresql_91 unless - PG.respond_to?( :library_version ) + + unless PG.respond_to?( :library_version ) + config.filter_run_excluding( :postgresql_91 ) + config.filter_run_excluding( :postgresql_92 ) unless PG.library_version >= '90200' + end end diff -r 994bad887ae9a963ef4cedf47aaa470da6a9e825 -r 10804d14d1e7ccf9b265cd08a6e28853a1a60c66 spec/pg/result_spec.rb --- a/spec/pg/result_spec.rb Tue Oct 30 15:03:28 2012 -0700 +++ b/spec/pg/result_spec.rb Tue Oct 30 15:04:13 2012 -0700 @@ -71,7 +71,7 @@ result.error_field( PG::PG_DIAG_INTERNAL_QUERY ).should be_nil() result.error_field( PG::PG_DIAG_CONTEXT ).should be_nil() result.error_field( PG::PG_DIAG_SOURCE_FILE ).should =~ /parse_relation\.c$/ - result.error_field( PG::PG_DIAG_SOURCE_LINE ).should == '857' + result.error_field( PG::PG_DIAG_SOURCE_LINE ).should =~ /^\d+$/ result.error_field( PG::PG_DIAG_SOURCE_FUNCTION ).should == 'parserOpenTable' end @@ -127,8 +127,8 @@ out_bytes.should == in_bytes end - it "should return the parameter type of the specified prepared statement parameter" do - query = 'SELECT * FROM pg_stat_activity WHERE user = $1::name AND current_query = $2::text' + it "should return the parameter type of the specified prepared statement parameter", :postgresql_92 do + query = 'SELECT * FROM pg_stat_activity WHERE user = $1::name AND query = $2::text' @conn.prepare( 'queryfinder', query ) res = @conn.describe_prepared( 'queryfinder' )