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

Commit06a8346

Browse files
committed
See attached for a small patch that enables plpython to build cleanly
under Cygwin. This patch together with my previous Python patch:http://postgresql.readysetnet.com/mhonarc/pgsql-patches/2001-05/msg00075.htmlenables full Python support (i.e., configure --with-python) for CygwinPostgreSQL.Jason Tishler
1 parentf6923ff commit06a8346

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

‎src/makefiles/Makefile.win

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.12 2001/05/2514:28:58 momjian Exp $
1+
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.13 2001/05/2515:48:33 momjian Exp $
22
LDFLAGS+= -g
33
DLLTOOL= dlltool
44
DLLWRAP= dllwrap
@@ -28,4 +28,8 @@ ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib)
2828
override CPPFLAGS+= -DBUILDING_DLL=1
2929
endif
3030

31+
ifeq ($(findstring src/pl/plpython,$(subdir)), src/pl/plpython)
32+
override CPPFLAGS+= -DUSE_DL_IMPORT
33+
endif
34+
3135
override javadir := '$(shell cygpath -w $(javadir))'

‎src/pl/plpython/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.6 2001/05/14 22:06:50 petere Exp $
1+
# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.7 2001/05/25 15:48:33 momjian Exp $
22

33
subdir = src/pl/plpython
44
top_builddir = ../../..
@@ -7,6 +7,8 @@ include $(top_builddir)/src/Makefile.global
77

88
overrideCPPFLAGS := -I$(srcdir) -I$(python_includedir)$(CPPFLAGS)
99

10+
overrideDLLLIBS :=$(BE_DLLLIBS)$(DLLLIBS)
11+
1012
NAME = plpython
1113
SO_MAJOR_VERSION = 0
1214
SO_MINOR_VERSION = 0

‎src/pl/plpython/feature.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SELECT global_test_two();
2929
(1 row)
3030

3131
SELECT import_fail();
32-
NOTICE: ('import socket failed -- untrusted dynamic module:socket',)
32+
NOTICE: ('import socket failed -- untrusted dynamic module:_socket',)
3333
import_fail
3434
--------------------
3535
failed as expected

‎src/pl/plpython/plpython.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.2 2001/05/12 01:30:30 petere Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.3 2001/05/25 15:48:33 momjian Exp $ */
22

33
/*
44
* plpython.c - python as a procedural language for PostgreSQL
@@ -1534,7 +1534,7 @@ static PyObject *PLy_spi_execute_fetch_result(SPITupleTable *, int, int);
15341534

15351535

15361536
PyTypeObjectPLy_PlanType= {
1537-
PyObject_HEAD_INIT(&PyType_Type)
1537+
PyObject_HEAD_INIT(NULL)
15381538
0,/*ob_size*/
15391539
"PLyPlan",/*tp_name*/
15401540
sizeof(PLyPlanObject),/*tp_size*/
@@ -1577,7 +1577,7 @@ PySequenceMethods PLy_result_as_sequence = {
15771577
};
15781578

15791579
PyTypeObjectPLy_ResultType= {
1580-
PyObject_HEAD_INIT(&PyType_Type)
1580+
PyObject_HEAD_INIT(NULL)
15811581
0,/*ob_size*/
15821582
"PLyResult",/*tp_name*/
15831583
sizeof(PLyResultObject),/*tp_size*/
@@ -2287,6 +2287,7 @@ PLy_init_plpy(void)
22872287

22882288
/* initialize plpy module
22892289
*/
2290+
PLy_PlanType.ob_type=PLy_ResultType.ob_type=&PyType_Type;
22902291
plpy=Py_InitModule("plpy",PLy_methods);
22912292
plpy_dict=PyModule_GetDict(plpy);
22922293

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp