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
15364ea0
Commit
15364ea0
authored
Mar 20, 2008
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed statement escaping to not escape continuation line markers.
parent
f4b7624e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/preproc/output.c
src/interfaces/ecpg/preproc/output.c
+13
-2
No files found.
src/interfaces/ecpg/ChangeLog
View file @
15364ea0
...
...
@@ -2327,3 +2327,8 @@ Sun, 02 Mar 2008 11:50:48 +0100
- Fixed bug that caused arrays of varchar to be output with incomplete
name.
Thu, 20 Mar 2008 16:54:27 +0100
- Changed statement escaping to not escape continuation line markers.
src/interfaces/ecpg/preproc/output.c
View file @
15364ea0
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/output.c,v 1.2
3 2007/11/15 21:14:45 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/output.c,v 1.2
4 2008/03/20 15:56:59 meskes
Exp $ */
#include "postgres_fe.h"
...
...
@@ -193,7 +193,18 @@ output_escaped_str(char *str, bool quoted)
else
if
(
str
[
i
]
==
'\n'
)
fputs
(
"
\\\n
"
,
yyout
);
else
if
(
str
[
i
]
==
'\\'
)
fputs
(
"
\\\\
"
,
yyout
);
{
int
j
=
i
;
/* check whether this is a continuation line
* if it is, do not output anything because newlines are escaped anyway */
/* accept blanks after the '\' as some other compilers do too */
do
{
j
++
;
}
while
(
str
[
j
]
==
' '
||
str
[
j
]
==
'\t'
);
if
((
str
[
j
]
!=
'\n'
)
&&
(
str
[
j
]
!=
'\r'
||
str
[
j
+
1
]
!=
'\n'
))
/* not followed by a newline */
fputs
(
"
\\\\
"
,
yyout
);
}
else
if
(
str
[
i
]
==
'\r'
&&
str
[
i
+
1
]
==
'\n'
)
{
fputs
(
"
\\\r\n
"
,
yyout
);
...
...
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