Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
2f7d369a
Commit
2f7d369a
authored
20 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Clarify code to double \\ and '.
parent
f009248a
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/bin/initdb/initdb.c
+3
-5
3 additions, 5 deletions
src/bin/initdb/initdb.c
src/bin/psql/describe.c
+2
-2
2 additions, 2 deletions
src/bin/psql/describe.c
src/bin/psql/large_obj.c
+2
-2
2 additions, 2 deletions
src/bin/psql/large_obj.c
src/pl/plpgsql/src/gram.y
+2
-2
2 additions, 2 deletions
src/pl/plpgsql/src/gram.y
with
9 additions
and
11 deletions
src/bin/initdb/initdb.c
+
3
−
5
View file @
2f7d369a
...
...
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.8
8
2005/0
6/28 15:38:12 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.8
9
2005/0
7/01 17:40:28 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1986,10 +1986,8 @@ escape_quotes(const char *src)
for
(
i
=
0
,
j
=
0
;
i
<
len
;
i
++
)
{
if
(
src
[
i
]
==
'\\'
)
result
[
j
++
]
=
'\\'
;
if
(
src
[
i
]
==
'\''
)
/* ANSI standard, '' */
result
[
j
++
]
=
'\''
;
if
(
src
[
i
]
==
'\\'
||
src
[
i
]
==
'\''
)
result
[
j
++
]
=
src
[
i
];
/* double these */
result
[
j
++
]
=
src
[
i
];
}
result
[
j
]
=
'\0'
;
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/describe.c
+
2
−
2
View file @
2f7d369a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.11
8
2005/0
6/26 03:03:56
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.11
9
2005/0
7/01 17:40:28
momjian Exp $
*/
#include
"postgres_fe.h"
#include
"describe.h"
...
...
@@ -1899,7 +1899,7 @@ processNamePattern(PQExpBuffer buf, const char *pattern,
/* Ensure chars special to string literals are passed properly */
if
(
*
cp
==
'\''
||
*
cp
==
'\\'
)
appendPQExpBufferChar
(
&
namebuf
,
*
cp
);
appendPQExpBufferChar
(
&
namebuf
,
*
cp
);
/* double these */
i
=
PQmblen
(
cp
,
pset
.
encoding
);
while
(
i
--
)
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/large_obj.c
+
2
−
2
View file @
2f7d369a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.3
7
2005/0
6/14 02:57:41
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.3
8
2005/0
7/01 17:40:28
momjian Exp $
*/
#include
"postgres_fe.h"
#include
"large_obj.h"
...
...
@@ -178,7 +178,7 @@ do_lo_import(const char *filename_arg, const char *comment_arg)
for
(
i
=
0
;
i
<
slen
;
i
++
)
{
if
(
comment_arg
[
i
]
==
'\''
||
comment_arg
[
i
]
==
'\\'
)
*
bufptr
++
=
'\\'
;
*
bufptr
++
=
comment_arg
[
i
];
/* double these */
*
bufptr
++
=
comment_arg
[
i
];
}
strcpy
(
bufptr
,
"'"
);
...
...
This diff is collapsed.
Click to expand it.
src/pl/plpgsql/src/gram.y
+
2
−
2
View file @
2f7d369a
...
...
@@ -4,7 +4,7 @@
* procedural language
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.7
7
2005/0
6/22 01:35:02 neilc
Exp $
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.7
8
2005/0
7/01 17:40:29 momjian
Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
...
...
@@ -387,7 +387,7 @@ decl_statement : decl_varname decl_const decl_datatype decl_notnull decl_defval
while (*cp1 != '\0')
{
if (*cp1 == '\\' || *cp1 == '\'')
*cp2++ =
'\\';
*cp2++ =
*cp1; /* double these */
*cp2++ = *cp1++;
}
strcpy(cp2, "'::refcursor");
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment