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
a13cefaf
Commit
a13cefaf
authored
Aug 25, 2007
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix synonym-dict breakage introduced in last patch :-(.
Minor other cleanups.
parent
93eab931
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
src/backend/tsearch/dict_synonym.c
src/backend/tsearch/dict_synonym.c
+10
-8
No files found.
src/backend/tsearch/dict_synonym.c
View file @
a13cefaf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/dict_synonym.c,v 1.
3 2007/08/25 00:03:59
tgl Exp $
* $PostgreSQL: pgsql/src/backend/tsearch/dict_synonym.c,v 1.
4 2007/08/25 02:29:45
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -120,30 +120,31 @@ dsynonym_init(PG_FUNCTION_ARGS)
/* Empty line */
goto
skipline
;
}
*
end
=
'\0'
;
if
(
end
>=
line
+
strlen
(
line
))
if
(
*
end
==
'\0'
)
{
/* A line with only one word. Ignore silently. */
goto
skipline
;
}
*
end
=
'\0'
;
starto
=
findwrd
(
end
+
1
,
&
end
);
if
(
!
starto
)
{
/* A line with only one word. Ignore silently. */
/* A line with only one word
(+whitespace)
. Ignore silently. */
goto
skipline
;
}
*
end
=
'\0'
;
/* starti now points to the first word, and starto to the second
/*
* starti now points to the first word, and starto to the second
* word on the line, with a \0 terminator at the end of both words.
*/
if
(
cur
=
=
d
->
len
)
if
(
cur
>
=
d
->
len
)
{
if
(
d
->
len
==
0
)
{
d
->
len
=
16
;
d
->
len
=
64
;
d
->
syn
=
(
Syn
*
)
palloc
(
sizeof
(
Syn
)
*
d
->
len
);
}
else
...
...
@@ -180,7 +181,8 @@ dsynonym_lexize(PG_FUNCTION_ARGS)
*
found
;
TSLexeme
*
res
;
if
(
len
<=
0
)
/* note: d->len test protects against Solaris bsearch-of-no-items bug */
if
(
len
<=
0
||
d
->
len
<=
0
)
PG_RETURN_POINTER
(
NULL
);
key
.
in
=
lowerstr_with_len
(
in
,
len
);
...
...
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