Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
19d80276
Commit
19d80276
authored
Nov 12, 2009
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pg_parse_string_token() --- not needed anymore.
parent
2dee828c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
38 deletions
+3
-38
src/backend/parser/parser.c
src/backend/parser/parser.c
+1
-34
src/include/parser/parser.h
src/include/parser/parser.h
+2
-4
No files found.
src/backend/parser/parser.c
View file @
19d80276
...
...
@@ -14,7 +14,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.8
2 2009/11/09 18:38:48
tgl Exp $
* $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.8
3 2009/11/12 01:13:12
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -61,39 +61,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).
*
...
...
src/include/parser/parser.h
View file @
19d80276
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/parser/parser.h,v 1.2
7 2009/07/13 00:42:17
tgl Exp $
* $PostgreSQL: pgsql/src/include/parser/parser.h,v 1.2
8 2009/11/12 01:13:12
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -31,11 +31,9 @@ extern bool escape_string_warning;
extern
PGDLLIMPORT
bool
standard_conforming_strings
;
/* Primary entry point
s
for the raw parsing functions */
/* Primary entry point for the raw parsing functions */
extern
List
*
raw_parser
(
const
char
*
str
);
extern
char
*
pg_parse_string_token
(
const
char
*
token
);
/* Utility functions exported by gram.y (perhaps these should be elsewhere) */
extern
List
*
SystemFuncName
(
char
*
name
);
extern
TypeName
*
SystemTypeName
(
char
*
name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment