|
14 | 14 | * Portions Copyright (c) 1994, Regents of the University of California
|
15 | 15 | *
|
16 | 16 | * 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 $ |
18 | 18 | *
|
19 | 19 | *-------------------------------------------------------------------------
|
20 | 20 | */
|
@@ -61,39 +61,6 @@ raw_parser(const char *str)
|
61 | 61 | }
|
62 | 62 |
|
63 | 63 |
|
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 |
| - |
97 | 64 | /*
|
98 | 65 | * Intermediate filter between parser and core lexer (core_yylex in scan.l).
|
99 | 66 | *
|
|
0 commit comments