Skip to content

Commit 19d8027

Browse files
committed
Remove pg_parse_string_token() --- not needed anymore.
1 parent 2dee828 commit 19d8027

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(const char *token)
76-
{
77-
core_yyscan_t yyscanner;
78-
base_yy_extra_type yyextra;
79-
int ctoken;
80-
core_YYSTYPE yylval;
81-
YYLTYPE yylloc;
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-
return yylval.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
extern PGDLLIMPORT bool standard_conforming_strings;
3232

3333

34-
/* Primary entry points for the raw parsing functions */
34+
/* Primary entry point for the raw parsing functions */
3535
extern List *raw_parser(const char *str);
3636

37-
extern char *pg_parse_string_token(const char *token);
38-
3937
/* Utility functions exported by gram.y (perhaps these should be elsewhere) */
4038
extern List *SystemFuncName(char *name);
4139
extern TypeName *SystemTypeName(char *name);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy