Commits

Michael Granger committed 10804d1

Adding some fixes for PostgreSQL 9.2.x

  • Participants
  • Parent commits 994bad8

Comments (0)

Files changed (2)

File spec/lib/helpers.rb

 
 	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
 

File spec/pg/result_spec.rb

 		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
 		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' )