Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
72f8efdc
Commit
72f8efdc
authored
Sep 26, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Back out /pl memory leak patch. Wait for new version.
parent
ff5d4cbf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
25 deletions
+4
-25
src/pl/plpython/feature.expected
src/pl/plpython/feature.expected
+1
-1
src/pl/plpython/plpython.c
src/pl/plpython/plpython.c
+1
-12
src/pl/plpython/plpython_schema.sql
src/pl/plpython/plpython_schema.sql
+1
-1
src/pl/tcl/pltcl.c
src/pl/tcl/pltcl.c
+1
-11
No files found.
src/pl/plpython/feature.expected
View file @
72f8efdc
...
...
@@ -29,7 +29,7 @@ SELECT global_test_two();
(1 row)
SELECT import_fail();
NOTICE
: ('import socket failed -- untrusted dynamic module: _socket',)
WARNING
: ('import socket failed -- untrusted dynamic module: _socket',)
import_fail
--------------------
failed as expected
...
...
src/pl/plpython/plpython.c
View file @
72f8efdc
...
...
@@ -29,7 +29,7 @@
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.2
3 2002/09/26 05:23:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.2
4 2002/09/26 05:39:03
momjian Exp $
*
*********************************************************************
*/
...
...
@@ -408,9 +408,7 @@ plpython_call_handler(PG_FUNCTION_ARGS)
else
PLy_restart_in_progress
+=
1
;
if
(
proc
)
{
Py_DECREF
(
proc
->
me
);
}
RERAISE_EXC
();
}
...
...
@@ -1843,14 +1841,7 @@ PLy_plan_dealloc(PyObject * arg)
*
* FIXME -- leaks saved plan on object destruction. can this be
* avoided?
* I think so. A function prepares and then execp's a statement.
* When we come to deallocate the 'statement' object we obviously
* no long need the plan. Even if we did, without the object
* we're never going to be able to use it again.
* In the against arguments: SPI_saveplan has stuck this under
* the top context so there must be a reason for doing that.
*/
pfree
(
ob
->
plan
);
}
if
(
ob
->
types
)
PLy_free
(
ob
->
types
);
...
...
@@ -2383,8 +2374,6 @@ PLy_spi_execute_fetch_result(SPITupleTable *tuptable, int rows, int status)
PyList_SetItem
(
result
->
rows
,
i
,
row
);
}
PLy_typeinfo_dealloc
(
&
args
);
SPI_freetuptable
(
tuptable
);
}
RESTORE_EXC
();
}
...
...
src/pl/plpython/plpython_schema.sql
View file @
72f8efdc
...
...
@@ -20,7 +20,7 @@ CREATE TABLE taxonomy (
CREATE
TABLE
entry
(
accession
text
not
null
primary
key
,
eid
serial
unique
,
eid
serial
,
txid
int2
not
null
references
taxonomy
(
id
)
)
;
...
...
src/pl/tcl/pltcl.c
View file @
72f8efdc
...
...
@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.6
3 2002/09/26 05:23:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.6
4 2002/09/26 05:39:03
momjian Exp $
*
**********************************************************************/
...
...
@@ -1647,7 +1647,6 @@ pltcl_SPI_exec(ClientData cdata, Tcl_Interp *interp,
pltcl_set_tuple_values
(
interp
,
arrayname
,
0
,
tuples
[
0
],
tupdesc
);
sprintf
(
buf
,
"%d"
,
ntuples
);
Tcl_SetResult
(
interp
,
buf
,
TCL_VOLATILE
);
SPI_freetuptable
(
SPI_tuptable
);
memcpy
(
&
Warn_restart
,
&
save_restart
,
sizeof
(
Warn_restart
));
return
TCL_OK
;
}
...
...
@@ -1669,19 +1668,15 @@ pltcl_SPI_exec(ClientData cdata, Tcl_Interp *interp,
continue
;
if
(
loop_rc
==
TCL_RETURN
)
{
SPI_freetuptable
(
SPI_tuptable
);
memcpy
(
&
Warn_restart
,
&
save_restart
,
sizeof
(
Warn_restart
));
return
TCL_RETURN
;
}
if
(
loop_rc
==
TCL_BREAK
)
break
;
SPI_freetuptable
(
SPI_tuptable
);
memcpy
(
&
Warn_restart
,
&
save_restart
,
sizeof
(
Warn_restart
));
return
TCL_ERROR
;
}
SPI_freetuptable
(
SPI_tuptable
);
/************************************************************
* Finally return the number of tuples
************************************************************/
...
...
@@ -2212,7 +2207,6 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp *interp,
{
if
(
ntuples
>
0
)
pltcl_set_tuple_values
(
interp
,
arrayname
,
0
,
tuples
[
0
],
tupdesc
);
SPI_freetuptable
(
SPI_tuptable
);
memcpy
(
&
Warn_restart
,
&
save_restart
,
sizeof
(
Warn_restart
));
sprintf
(
buf
,
"%d"
,
ntuples
);
Tcl_SetResult
(
interp
,
buf
,
TCL_VOLATILE
);
...
...
@@ -2235,19 +2229,15 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp *interp,
continue
;
if
(
loop_rc
==
TCL_RETURN
)
{
SPI_freetuptable
(
SPI_tuptable
);
memcpy
(
&
Warn_restart
,
&
save_restart
,
sizeof
(
Warn_restart
));
return
TCL_RETURN
;
}
if
(
loop_rc
==
TCL_BREAK
)
break
;
SPI_freetuptable
(
SPI_tuptable
);
memcpy
(
&
Warn_restart
,
&
save_restart
,
sizeof
(
Warn_restart
));
return
TCL_ERROR
;
}
SPI_freetuptable
(
SPI_tuptable
);
/************************************************************
* Finally return the number of tuples
************************************************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment