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
23ecb885
Commit
23ecb885
authored
Mar 22, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add PQfreemem() call for Win32.
parent
aaf11b93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
3 deletions
+36
-3
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+20
-1
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-exec.c
+14
-1
src/interfaces/libpq/libpq-fe.h
src/interfaces/libpq/libpq-fe.h
+2
-1
No files found.
doc/src/sgml/libpq.sgml
View file @
23ecb885
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.11
3 2003/03/20 06:23:30
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.11
4 2003/03/22 03:29:05
momjian Exp $
-->
<chapter id="libpq">
...
...
@@ -1151,6 +1151,25 @@ unsigned char *PQunescapeBytea(const unsigned char *from, size_t *to_length);
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><function>PQfreemem</function></term>
<listitem>
<para>
Frees memory allocated by <application>libpq</>
<synopsis>
void PQfreemem(void *ptr);
</synopsis>
</para>
<para>
Frees memory allocated by <application>libpq</>, particularly
<function>PQescapeBytea</function> and <function>PQunescapeBytea</function>.
It is needed by Win32, which can not free memory across
DLL's, unless multithreaded DLL's (/MD in VC6) are used.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
...
...
src/interfaces/libpq/fe-exec.c
View file @
23ecb885
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.12
6 2003/03/10 22:28:21 tgl
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.12
7 2003/03/22 03:29:06 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -284,6 +284,19 @@ PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
return
buffer
;
}
/*
* PQfreemem - safely frees memory allocated
*
* Needed mostly by Win32, unless multithreaded DLL (/MD in VC6)
* Used for freeing memory from PQescapeByte()a/PQunescapeBytea()
*/
void
PQfreemem
(
void
*
ptr
)
{
free
(
ptr
);
}
/* ----------------
* Space management for PGresult.
*
...
...
src/interfaces/libpq/libpq-fe.h
View file @
23ecb885
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-fe.h,v 1.
89 2003/03/20 06:23:30
momjian Exp $
* $Id: libpq-fe.h,v 1.
90 2003/03/22 03:29:06
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -254,6 +254,7 @@ extern unsigned char *PQescapeBytea(const unsigned char *bintext, size_t binlen,
size_t
*
bytealen
);
extern
unsigned
char
*
PQunescapeBytea
(
const
unsigned
char
*
strtext
,
size_t
*
retbuflen
);
extern
void
PQfreemem
(
void
*
ptr
);
/* Simple synchronous query */
...
...
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