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
3de1f0da
Commit
3de1f0da
authored
Nov 25, 2007
by
Andrew Dunstan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix XML tag namespace change inadvertantly missed from previous fix. Add
regression test for XML names and numeric entities.
parent
a999ff63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
src/backend/tsearch/wparser_def.c
src/backend/tsearch/wparser_def.c
+8
-3
src/test/regress/expected/tsearch.out
src/test/regress/expected/tsearch.out
+15
-0
src/test/regress/sql/tsearch.sql
src/test/regress/sql/tsearch.sql
+4
-0
No files found.
src/backend/tsearch/wparser_def.c
View file @
3de1f0da
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.1
1 2007/11/20 02:25:22
adunstan Exp $
* $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.1
2 2007/11/25 15:37:11
adunstan Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -827,7 +827,6 @@ static const TParserStateActionItem actionTPS_InXMLEntity[] = {
{
p_isalnum
,
0
,
A_NEXT
,
TPS_InXMLEntity
,
0
,
NULL
},
{
p_iseqC
,
':'
,
A_NEXT
,
TPS_InXMLEntity
,
0
,
NULL
},
{
p_iseqC
,
'_'
,
A_NEXT
,
TPS_InXMLEntity
,
0
,
NULL
},
{
p_iseqC
,
':'
,
A_NEXT
,
TPS_InXMLEntity
,
0
,
NULL
},
{
p_iseqC
,
'.'
,
A_NEXT
,
TPS_InXMLEntity
,
0
,
NULL
},
{
p_iseqC
,
'-'
,
A_NEXT
,
TPS_InXMLEntity
,
0
,
NULL
},
{
p_iseqC
,
';'
,
A_NEXT
,
TPS_InXMLEntityEnd
,
0
,
NULL
},
...
...
@@ -871,6 +870,8 @@ static const TParserStateActionItem actionTPS_InTagFirst[] = {
{
p_iseqC
,
'!'
,
A_PUSH
,
TPS_InCommentFirst
,
0
,
NULL
},
{
p_iseqC
,
'?'
,
A_PUSH
,
TPS_InXMLBegin
,
0
,
NULL
},
{
p_isasclet
,
0
,
A_PUSH
,
TPS_InTagName
,
0
,
NULL
},
{
p_iseqC
,
':'
,
A_PUSH
,
TPS_InTagName
,
0
,
NULL
},
{
p_iseqC
,
'_'
,
A_PUSH
,
TPS_InTagName
,
0
,
NULL
},
{
NULL
,
0
,
A_POP
,
TPS_Null
,
0
,
NULL
}
};
...
...
@@ -894,7 +895,11 @@ static const TParserStateActionItem actionTPS_InTagName[] = {
{
p_iseqC
,
'/'
,
A_NEXT
,
TPS_InTagBeginEnd
,
0
,
NULL
},
{
p_iseqC
,
'>'
,
A_NEXT
,
TPS_InTagEnd
,
0
,
SpecialTags
},
{
p_isspace
,
0
,
A_NEXT
,
TPS_InTag
,
0
,
SpecialTags
},
{
p_isasclet
,
0
,
A_NEXT
,
TPS_Null
,
0
,
NULL
},
{
p_isalnum
,
0
,
A_NEXT
,
TPS_Null
,
0
,
NULL
},
{
p_iseqC
,
':'
,
A_NEXT
,
TPS_Null
,
0
,
NULL
},
{
p_iseqC
,
'_'
,
A_NEXT
,
TPS_Null
,
0
,
NULL
},
{
p_iseqC
,
'.'
,
A_NEXT
,
TPS_Null
,
0
,
NULL
},
{
p_iseqC
,
'-'
,
A_NEXT
,
TPS_Null
,
0
,
NULL
},
{
NULL
,
0
,
A_POP
,
TPS_Null
,
0
,
NULL
}
};
...
...
src/test/regress/expected/tsearch.out
View file @
3de1f0da
...
...
@@ -391,6 +391,21 @@ SELECT length(to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://ae
51
(1 row)
-- ts_debug
SELECT * from ts_debug('
<myns:foo-bar
_baz
.
blurfl
>
abc
&nm1;
def
©
ghi
õ
jkl
</myns:foo-bar
_baz.blurfl
>
');
alias | description | token | dictionaries | dictionary | lexemes
-----------+-----------------+----------------------------+----------------+--------------+---------
tag | XML tag |
<myns:foo-bar
_baz
.
blurfl
>
| {} | |
asciiword | Word, all ASCII | abc | {english_stem} | english_stem | {abc}
entity | XML entity |
&nm1;
| {} | |
asciiword | Word, all ASCII | def | {english_stem} | english_stem | {def}
entity | XML entity |
©
| {} | |
asciiword | Word, all ASCII | ghi | {english_stem} | english_stem | {ghi}
entity | XML entity |
õ
| {} | |
asciiword | Word, all ASCII | jkl | {english_stem} | english_stem | {jkl}
tag | XML tag |
</myns:foo-bar
_baz.blurfl
>
| {} | |
(9 rows)
-- to_tsquery
SELECT to_tsquery('english', 'qwe
&
sKies ');
to_tsquery
...
...
src/test/regress/sql/tsearch.sql
View file @
3de1f0da
...
...
@@ -98,6 +98,10 @@ SELECT length(to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://ae
/usr/local/fff /awdf/dwqe/4325 rewt/ewr wefjn /wqe-324/ewr gist.h gist.h.c gist.c. readline 4.2 4.2. 4.2, readline-4.2 readline-4.2. 234
<i <b> wow < jqw <> qwerty'
));
-- ts_debug
SELECT
*
from
ts_debug
(
'<myns:foo-bar_baz.blurfl>abc&nm1;def©ghiõjkl</myns:foo-bar_baz.blurfl>'
);
-- to_tsquery
SELECT
to_tsquery
(
'english'
,
'qwe & sKies '
);
...
...
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