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

Commit19d8027

Browse files
committed
Remove pg_parse_string_token() --- not needed anymore.
1 parent2dee828 commit19d8027

File tree

2 files changed

+3
-38
lines changed

2 files changed

+3
-38
lines changed

‎src/backend/parser/parser.c

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
1616
* IDENTIFICATION
17-
* $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.82 2009/11/09 18:38:48 tgl Exp $
17+
* $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.83 2009/11/12 01:13:12 tgl Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -61,39 +61,6 @@ raw_parser(const char *str)
6161
}
6262

6363

64-
/*
65-
* pg_parse_string_token - get the value represented by a string literal
66-
*
67-
* Given the textual form of a SQL string literal, produce the represented
68-
* value as a palloc'd string. It is caller's responsibility that the
69-
* passed string does represent one single string literal.
70-
*
71-
* We export this function to avoid having plpgsql depend on internal details
72-
* of the core grammar (such as the token code assigned to SCONST).
73-
*/
74-
char*
75-
pg_parse_string_token(constchar*token)
76-
{
77-
core_yyscan_tyyscanner;
78-
base_yy_extra_typeyyextra;
79-
intctoken;
80-
core_YYSTYPEyylval;
81-
YYLTYPEyylloc;
82-
83-
yyscanner=scanner_init(token,&yyextra.core_yy_extra,
84-
ScanKeywords,NumScanKeywords);
85-
86-
ctoken=core_yylex(&yylval,&yylloc,yyscanner);
87-
88-
if (ctoken!=SCONST)/* caller error */
89-
elog(ERROR,"expected string constant, got token code %d",ctoken);
90-
91-
scanner_finish(yyscanner);
92-
93-
returnyylval.str;
94-
}
95-
96-
9764
/*
9865
* Intermediate filter between parser and core lexer (core_yylex in scan.l).
9966
*

‎src/include/parser/parser.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/include/parser/parser.h,v 1.27 2009/07/13 00:42:17 tgl Exp $
11+
* $PostgreSQL: pgsql/src/include/parser/parser.h,v 1.28 2009/11/12 01:13:12 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -31,11 +31,9 @@ extern bool escape_string_warning;
3131
externPGDLLIMPORTboolstandard_conforming_strings;
3232

3333

34-
/* Primary entrypoints for the raw parsing functions */
34+
/* Primary entrypoint for the raw parsing functions */
3535
externList*raw_parser(constchar*str);
3636

37-
externchar*pg_parse_string_token(constchar*token);
38-
3937
/* Utility functions exported by gram.y (perhaps these should be elsewhere) */
4038
externList*SystemFuncName(char*name);
4139
externTypeName*SystemTypeName(char*name);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp