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
b13da41e
Commit
b13da41e
authored
Jan 21, 2010
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unsafe loop test, and declare as_ident as bool rather than int.
parent
d6667967
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-exec.c
+5
-5
No files found.
src/interfaces/libpq/fe-exec.c
View file @
b13da41e
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.20
7 2010/01/21 14:58:53
rhaas Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.20
8 2010/01/21 18:43:25
rhaas Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -3066,7 +3066,7 @@ PQescapeString(char *to, const char *from, size_t length)
* of memory condition, we return NULL, storing an error message into conn.
*/
static
char
*
PQescapeInternal
(
PGconn
*
conn
,
const
char
*
str
,
size_t
len
,
int
as_ident
)
PQescapeInternal
(
PGconn
*
conn
,
const
char
*
str
,
size_t
len
,
bool
as_ident
)
{
const
char
*
s
;
char
*
result
;
...
...
@@ -3082,7 +3082,7 @@ PQescapeInternal(PGconn *conn, const char *str, size_t len, int as_ident)
return
NULL
;
/* Scan the string for characters that must be escaped. */
for
(
s
=
str
;
*
s
!=
'\0'
&&
(
s
-
str
)
<
len
;
++
s
)
for
(
s
=
str
;
(
s
-
str
)
<
len
&&
*
s
!=
'\0'
;
++
s
)
{
if
(
*
s
==
quote_char
)
++
num_quotes
;
...
...
@@ -3188,13 +3188,13 @@ PQescapeInternal(PGconn *conn, const char *str, size_t len, int as_ident)
char
*
PQescapeLiteral
(
PGconn
*
conn
,
const
char
*
str
,
size_t
len
)
{
return
PQescapeInternal
(
conn
,
str
,
len
,
0
);
return
PQescapeInternal
(
conn
,
str
,
len
,
false
);
}
char
*
PQescapeIdentifier
(
PGconn
*
conn
,
const
char
*
str
,
size_t
len
)
{
return
PQescapeInternal
(
conn
,
str
,
len
,
1
);
return
PQescapeInternal
(
conn
,
str
,
len
,
true
);
}
/* HEX encoding support for bytea */
...
...
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