mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-29 22:49:41 +03:00 
			
		
		
		
	Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines are now indented one tab stop). We've also updated to perltidy version 20230309 and changed some of its settings, which reduces its desire to add whitespace to lines to make assignments etc. line up. Going forward, that should make for fewer random-seeming changes to existing code. Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
		
			
				
	
	
		
			57 lines
		
	
	
		
			831 B
		
	
	
	
		
			Perl
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			831 B
		
	
	
	
		
			Perl
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/perl
 | |
| 
 | |
| # Copyright (c) 2021-2023, PostgreSQL Global Development Group
 | |
| 
 | |
| use strict;
 | |
| use warnings;
 | |
| 
 | |
| my $integer = '[+-]?[0-9]+';
 | |
| my $real = '[+-]?[0-9]+\.[0-9]+';
 | |
| 
 | |
| my $RANGE = '(\.\.)(\.)?';
 | |
| my $PLUMIN = q(\'\+\-\');
 | |
| my $FLOAT = "(($integer)|($real))([eE]($integer))?";
 | |
| my $EXTENSION = '<|>|~';
 | |
| 
 | |
| my $boundary = "($EXTENSION)?$FLOAT";
 | |
| my $deviation = $FLOAT;
 | |
| 
 | |
| my $rule_1 = $boundary . $PLUMIN . $deviation;
 | |
| my $rule_2 = $boundary . $RANGE . $boundary;
 | |
| my $rule_3 = $boundary . $RANGE;
 | |
| my $rule_4 = $RANGE . $boundary;
 | |
| my $rule_5 = $boundary;
 | |
| 
 | |
| 
 | |
| print "$rule_5\n";
 | |
| while (<>)
 | |
| {
 | |
| 
 | |
| 	#  s/ +//g;
 | |
| 	if (/^($rule_1)$/)
 | |
| 	{
 | |
| 		print;
 | |
| 	}
 | |
| 	elsif (/^($rule_2)$/)
 | |
| 	{
 | |
| 		print;
 | |
| 	}
 | |
| 	elsif (/^($rule_3)$/)
 | |
| 	{
 | |
| 		print;
 | |
| 	}
 | |
| 	elsif (/^($rule_4)$/)
 | |
| 	{
 | |
| 		print;
 | |
| 	}
 | |
| 	elsif (/^($rule_5)$/)
 | |
| 	{
 | |
| 		print;
 | |
| 	}
 | |
| 	else
 | |
| 	{
 | |
| 		print STDERR "error in $_\n";
 | |
| 	}
 | |
| 
 | |
| }
 |