mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	[processing] remove trailing semicolon from SQL before creating
layer (fix #30239)
This commit is contained in:
		
							parent
							
								
									fbbf2e68ea
								
							
						
					
					
						commit
						017f41f96c
					
				@ -101,7 +101,7 @@ class PostGISExecuteAndLoadSQL(QgisAlgorithm):
 | 
			
		||||
        uri = postgis.uri_from_name(connection)
 | 
			
		||||
        sql = self.parameterAsString(parameters, self.SQL, context)
 | 
			
		||||
        sql = sql.replace('\n', ' ')
 | 
			
		||||
        uri.setDataSource("", "(" + sql + ")", geom_field, "", id_field)
 | 
			
		||||
        uri.setDataSource("", "(" + sql.rstrip(';') + ")", geom_field, "", id_field)
 | 
			
		||||
 | 
			
		||||
        vlayer = QgsVectorLayer(uri.uri(), "layername", "postgres")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user