mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 09:47:30 +03:00 
			
		
		
		
	Added %% use to the docs
This commit is contained in:
		
							parent
							
								
									e8fb84306d
								
							
						
					
					
						commit
						08c8b62e1b
					
				| 
						 | 
					@ -97,6 +97,9 @@ many placeholders can use the same values::
 | 
				
			||||||
    ...         VALUES (%(int)s, %(date)s, %(date)s, %(str)s);""",
 | 
					    ...         VALUES (%(int)s, %(date)s, %(date)s, %(str)s);""",
 | 
				
			||||||
    ...     {'int': 10, 'str': "O'Reilly", 'date': datetime.date(2005, 11, 18)})
 | 
					    ...     {'int': 10, 'str': "O'Reilly", 'date': datetime.date(2005, 11, 18)})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					When parameters are used, in order to include a literal ``%`` in the query you
 | 
				
			||||||
 | 
					can use the ``%%`` string.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
While the mechanism resembles regular Python strings manipulation, there are a
 | 
					While the mechanism resembles regular Python strings manipulation, there are a
 | 
				
			||||||
few subtle differences you should care about when passing parameters to a
 | 
					few subtle differences you should care about when passing parameters to a
 | 
				
			||||||
query:
 | 
					query:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user