diff options
author | Tom Lane | 2009-11-12 01:13:12 +0000 |
---|---|---|
committer | Tom Lane | 2009-11-12 01:13:12 +0000 |
commit | 19d802767d7b9c37390c46d337e6558c0b60ea57 (patch) | |
tree | a0c5007b7bee65a2fdc520c66a8eaf4f1c2ffcc1 /src/backend/parser/parser.c | |
parent | 2dee828cacfe58f6babe2c86f95bf106c8060ca4 (diff) |
Remove pg_parse_string_token() --- not needed anymore.
Diffstat (limited to 'src/backend/parser/parser.c')
-rw-r--r-- | src/backend/parser/parser.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/backend/parser/parser.c b/src/backend/parser/parser.c index 354e335ce91..d4e25b21451 100644 --- a/src/backend/parser/parser.c +++ b/src/backend/parser/parser.c @@ -14,7 +14,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.82 2009/11/09 18:38:48 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.83 2009/11/12 01:13:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -62,39 +62,6 @@ raw_parser(const char *str) /* - * pg_parse_string_token - get the value represented by a string literal - * - * Given the textual form of a SQL string literal, produce the represented - * value as a palloc'd string. It is caller's responsibility that the - * passed string does represent one single string literal. - * - * We export this function to avoid having plpgsql depend on internal details - * of the core grammar (such as the token code assigned to SCONST). - */ -char * -pg_parse_string_token(const char *token) -{ - core_yyscan_t yyscanner; - base_yy_extra_type yyextra; - int ctoken; - core_YYSTYPE yylval; - YYLTYPE yylloc; - - yyscanner = scanner_init(token, &yyextra.core_yy_extra, - ScanKeywords, NumScanKeywords); - - ctoken = core_yylex(&yylval, &yylloc, yyscanner); - - if (ctoken != SCONST) /* caller error */ - elog(ERROR, "expected string constant, got token code %d", ctoken); - - scanner_finish(yyscanner); - - return yylval.str; -} - - -/* * Intermediate filter between parser and core lexer (core_yylex in scan.l). * * The filter is needed because in some cases the standard SQL grammar |