mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Doc: Python's control flow construct is try/except not try/catch.
Very ancient thinko, dating evidently to 22690719e.
Spotted by gweatherby.
Discussion: https://postgr.es/m/170423637139.1288848.11840082988774620003@wrigleys.postgresql.org
			
			
This commit is contained in:
		@@ -1175,7 +1175,7 @@ plan = plpy.prepare("INSERT INTO operations (result) VALUES ($1)", ["text"])
 | 
				
			|||||||
plpy.execute(plan, [result])
 | 
					plpy.execute(plan, [result])
 | 
				
			||||||
$$ LANGUAGE plpython3u;
 | 
					$$ LANGUAGE plpython3u;
 | 
				
			||||||
</programlisting>
 | 
					</programlisting>
 | 
				
			||||||
    Note that the use of <literal>try/catch</literal> is still
 | 
					    Note that the use of <literal>try</literal>/<literal>except</literal> is still
 | 
				
			||||||
    required.  Otherwise the exception would propagate to the top of
 | 
					    required.  Otherwise the exception would propagate to the top of
 | 
				
			||||||
    the Python stack and would cause the whole function to abort with
 | 
					    the Python stack and would cause the whole function to abort with
 | 
				
			||||||
    a <productname>PostgreSQL</productname> error, so that the
 | 
					    a <productname>PostgreSQL</productname> error, so that the
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user