postgres.git / summary / log / commit / refs

commit    b83941beeb07879bf8d175120d5efee3df3d4faa
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Wed Jan 03 17:22:00 2024 +0000

    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


doc/src/sgml/plpython.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index 06ab7dd0708..dbb83072aa3 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -1323,7 +1323,7 @@ plan = plpy.prepare("INSERT INTO operations (result) VALUES ($1)", ["text"]) plpy.execute(plan, [result]) $$ LANGUAGE plpythonu; </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 the Python stack and would cause the whole function to abort with a <productname>PostgreSQL</productname> error, so that the [parent: aa2e323eedc9]