mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Add explicit test for various comment syntaxes.
This commit is contained in:
		
							
								
								
									
										16
									
								
								src/test/regress/sql/comments.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								src/test/regress/sql/comments.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
--
 | 
			
		||||
-- Comments
 | 
			
		||||
--
 | 
			
		||||
 | 
			
		||||
SELECT 'trailing' AS first; -- trailing single line
 | 
			
		||||
SELECT /* embedded single line */ 'embedded' AS second;
 | 
			
		||||
SELECT /* both embedded and trailing single line */ 'both' AS third; -- trailing single line
 | 
			
		||||
 | 
			
		||||
SELECT 'before multi-line' AS fourth;
 | 
			
		||||
/* This is an example of SQL which should not execute:
 | 
			
		||||
 * select 'multi-line';
 | 
			
		||||
 */
 | 
			
		||||
SELECT 'after multi-line' AS fifth;
 | 
			
		||||
 | 
			
		||||
/* and this is the end of the file */
 | 
			
		||||
 | 
			
		||||
@@ -27,6 +27,7 @@ reltime
 | 
			
		||||
abstime
 | 
			
		||||
tinterval
 | 
			
		||||
horology
 | 
			
		||||
comments
 | 
			
		||||
create_function_1
 | 
			
		||||
create_type
 | 
			
		||||
create_table
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user