Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6d297e0

Browse files
committed
Minor kibitzing on previous patch: no need to run check more than once.
(_PG_init should be called only once anyway, but as long as it's got aninternal guard against repeat calls, that should be in front of theversion check.)
1 parent8037160 commit6d297e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/pl/plpython/plpython.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plpython.c - python as a procedural language for PostgreSQL
33
*
4-
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.147 2010/07/0818:42:12 petere Exp $
4+
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.148 2010/07/0819:00:11 tgl Exp $
55
*
66
*********************************************************************
77
*/
@@ -3220,6 +3220,9 @@ _PG_init(void)
32203220
staticboolinited= false;
32213221
constint**version_ptr;
32223222

3223+
if (inited)
3224+
return;
3225+
32233226
/* Be sure we don't run Python 2 and 3 in the same session (might crash) */
32243227
version_ptr= (constint**)find_rendezvous_variable("plpython_python_version");
32253228
if (!(*version_ptr))
@@ -3234,9 +3237,6 @@ _PG_init(void)
32343237
errhint("Start a new session to use a different Python major version.")));
32353238
}
32363239

3237-
if (inited)
3238-
return;
3239-
32403240
pg_bindtextdomain(TEXTDOMAIN);
32413241

32423242
#ifPY_MAJOR_VERSION >=3

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp