Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7085aba

Browse files
committed
Remove quote removal. Moved to parser.
1 parent36aaf25 commit7085aba

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

‎src/backend/parser/scansup.c

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.4 1996/11/04 04:04:58 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.5 1996/11/15 18:38:55 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -23,15 +23,6 @@
2323
#include"utils/elog.h"
2424
#include"parser/scansup.h"
2525

26-
/*
27-
*Scanner error handler.
28-
*/
29-
staticvoid
30-
serror(char*str)
31-
{
32-
elog(WARN,"*** scanner error: %s\n",str);
33-
}
34-
3526
/* ----------------
3627
*scanstr
3728
*
@@ -51,31 +42,14 @@ char*
5142
scanstr(char*s)
5243
{
5344
staticcharnewStr[MAX_PARSE_BUFFER];
54-
intlen,i,start,j;
55-
chardelimiter;
45+
intlen,i,j;
5646

5747
if (s==NULL||s[0]=='\0')
5848
returns;
5949

6050
len=strlen(s);
61-
start=0;
62-
63-
/* remove leading and trailing quotes, if any */
64-
/* the normal backend lexer only accepts single quotes, but the
65-
bootstrap lexer accepts double quotes */
66-
delimiter=0;
67-
if (s[0]=='"'||s[0]=='\''){
68-
delimiter=s[0];
69-
start=1;
70-
}
71-
if (delimiter!=0) {
72-
if (s[len-1]==delimiter)
73-
len=len-1;
74-
else
75-
serror("mismatched quote delimiters");
76-
}
7751

78-
for (i=start,j=0;i<len ;i++) {
52+
for (i=0,j=0;i<len ;i++) {
7953
if (s[i]=='\'') {
8054
i=i+1;
8155
if (s[i]=='\'')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp