Tweak how postgresql version is detected
pattern match didn't work for the 10.5 version
This commit is contained in:
		
							parent
							
								
									190a8318cc
								
							
						
					
					
						commit
						12a29f2088
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -47,7 +47,7 @@ def get_version(): | ||||||
|     """ |     """ | ||||||
|     result = sudo('psql --version') |     result = sudo('psql --version') | ||||||
|     if result.succeeded: |     if result.succeeded: | ||||||
|         match = re.match(r'^psql \(PostgreSQL\) (\d+\.\d+)\.\d+', result) |         match = re.match(r'^psql \(PostgreSQL\) (\d+\.\d+)(?:\.\d+)?', result) | ||||||
|         if match: |         if match: | ||||||
|             return float(match.group(1)) |             return float(match.group(1)) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar