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
e4b523e5
Commit
e4b523e5
authored
Mar 16, 2016
by
Teodor Sigaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files forgotten in
f576b17c
parent
f576b17c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1782 additions
and
0 deletions
+1782
-0
contrib/pg_trgm/data/trgm2.data
contrib/pg_trgm/data/trgm2.data
+696
-0
contrib/pg_trgm/expected/pg_word_trgm.out
contrib/pg_trgm/expected/pg_word_trgm.out
+1044
-0
contrib/pg_trgm/sql/pg_word_trgm.sql
contrib/pg_trgm/sql/pg_word_trgm.sql
+42
-0
No files found.
contrib/pg_trgm/data/trgm2.data
0 → 100644
View file @
e4b523e5
This diff is collapsed.
Click to expand it.
contrib/pg_trgm/expected/pg_word_trgm.out
0 → 100644
View file @
e4b523e5
This diff is collapsed.
Click to expand it.
contrib/pg_trgm/sql/pg_word_trgm.sql
0 → 100644
View file @
e4b523e5
CREATE
TABLE
test_trgm2
(
t
text
COLLATE
"C"
);
\
copy
test_trgm2
from
'data/trgm2.data'
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
'Baykal'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
'Kabankala'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Baykal'
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Kabankala'
order
by
sml
desc
,
t
;
select
t
<->>
'Kabankala'
,
t
from
test_trgm2
order
by
t
<->>
'Kabankala'
limit
7
;
create
index
trgm_idx2
on
test_trgm2
using
gist
(
t
gist_trgm_ops
);
set
enable_seqscan
=
off
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
'Baykal'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
'Kabankala'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Baykal'
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Kabankala'
order
by
sml
desc
,
t
;
explain
(
costs
off
)
select
t
<->>
'Kabankala'
,
t
from
test_trgm2
order
by
t
<->>
'Kabankala'
limit
7
;
select
t
<->>
'Kabankala'
,
t
from
test_trgm2
order
by
t
<->>
'Kabankala'
limit
7
;
drop
index
trgm_idx2
;
create
index
trgm_idx2
on
test_trgm2
using
gin
(
t
gin_trgm_ops
);
set
enable_seqscan
=
off
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
'Baykal'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
'Kabankala'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Baykal'
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Kabankala'
order
by
sml
desc
,
t
;
set
"pg_trgm.word_similarity_threshold"
to
0
.
5
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
'Baykal'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
'Kabankala'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Baykal'
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Kabankala'
order
by
sml
desc
,
t
;
set
"pg_trgm.word_similarity_threshold"
to
0
.
3
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
'Baykal'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
'Kabankala'
<%
t
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Baykal'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Baykal'
order
by
sml
desc
,
t
;
select
t
,
word_similarity
(
'Kabankala'
,
t
)
as
sml
from
test_trgm2
where
t
%>
'Kabankala'
order
by
sml
desc
,
t
;
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