mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-29 22:49:41 +03:00 
			
		
		
		
	While the set of covered functionality is fairly small, the added tests still are useful to get some basic buildfarm testing of pg_stat_statements itself, but also to exercise the lwlock tranch code on the buildfarm. Author: Amit Kapila, slightly editorialized by me Reviewed-By: Ashutosh Sharma, Andres Freund Discussion: <CAA4eK1JOjkdXYtHxh=2aDK4VgDtN-LNGKY_YqX0N=YEvuzQVWg@mail.gmail.com>
		
			
				
	
	
		
			16 lines
		
	
	
		
			383 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			383 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
| CREATE EXTENSION pg_stat_statements;
 | |
| 
 | |
| CREATE TABLE test (a int, b char(20));
 | |
| 
 | |
| -- test the basic functionality of pg_stat_statements
 | |
| SELECT pg_stat_statements_reset();
 | |
| 
 | |
| INSERT INTO test VALUES(generate_series(1, 10), 'aaa');
 | |
| UPDATE test SET b = 'bbb' WHERE a > 5;
 | |
| 
 | |
| SELECT query, calls, rows from pg_stat_statements ORDER BY rows;
 | |
| 
 | |
| DROP TABLE test;
 | |
| 
 | |
| DROP EXTENSION pg_stat_statements;
 |