Commits

Michael Granger committed 9daa5a0

Don't set the application_name for versions of PG less than 9.0

Comments (0)

Files changed (1)

spec/pg/connection_spec.rb

 
 	before( :each ) do
 		@conn.exec( 'BEGIN' ) unless example.metadata[:without_transaction]
-		@conn.exec_params %Q{SET application_name TO '%s'} %
-			[@conn.escape_string(example.description[0,60])]
+		if PG.library_version >= 90000
+			@conn.exec_params %Q{SET application_name TO '%s'} %
+				[@conn.escape_string(example.description[0,60])]
+		end
 	end
 
 	after( :each ) do