*** pgsql/src/pl/plpython/plpython.c 2010/07/08 18:42:12 1.147 --- pgsql/src/pl/plpython/plpython.c 2010/07/08 19:00:11 1.148 *************** *** 1,7 **** /********************************************************************** * plpython.c - python as a procedural language for PostgreSQL * ! * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.146 2010/07/06 19:19:01 momjian Exp $ * ********************************************************************* */ --- 1,7 ---- /********************************************************************** * plpython.c - python as a procedural language for PostgreSQL * ! * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.147 2010/07/08 18:42:12 petere Exp $ * ********************************************************************* */ *************** _PG_init(void) *** 3220,3225 **** --- 3220,3228 ---- static bool inited = false; const int **version_ptr; + if (inited) + return; + /* Be sure we don't run Python 2 and 3 in the same session (might crash) */ version_ptr = (const int **) find_rendezvous_variable("plpython_python_version"); if (!(*version_ptr)) *************** _PG_init(void) *** 3234,3242 **** errhint("Start a new session to use a different Python major version."))); } - if (inited) - return; - pg_bindtextdomain(TEXTDOMAIN); #if PY_MAJOR_VERSION >= 3 --- 3237,3242 ----