pg_trgm_pro's Introduction
PostgreSQL Database Management System ===================================== This directory contains the source code distribution of the PostgreSQL database management system. PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings. PostgreSQL has many language interfaces, many of which are listed here: http://www.postgresql.org/download See the file INSTALL for instructions on how to build and install PostgreSQL. That file also lists supported operating systems and hardware platforms and contains information regarding any other software packages that are required to build or run the PostgreSQL system. Copyright and license information can be found in the file COPYRIGHT. A comprehensive documentation set is included in this distribution; it can be read as described in the installation instructions. The latest version of this software may be obtained at http://www.postgresql.org/download/. For more information look at our web site located at http://www.postgresql.org/.
pg_trgm_pro's People
pg_trgm_pro's Issues
pg_trgm_pro for Windows?
Hi,
building pg_trgm on Windows fails:
C:\Users\abidh\source\repos\pg_trgm_pro>make USE_PGXS=1
makefile:15: C:/Program: No such file or directory
makefile:15: Files/PostgreSQL/11/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** Keine Regel, um »Files/PostgreSQL/11/lib/pgxs/src/makefiles/pgxs.mk« zu erstellen. Schluss.
I guess currently there is no way to use the extension on Windows?
Regards
Feature request: option to include trigrams containing whitespace or special characters
I'd like to be able to include trigrams so that
similarity('foo bar', 'foo bar') > similarity('foo bar', 'bar foo')
I wish I could make it generate the o b
and r f
trigrams to accomplish this. Similarly I'd like
similarity('foo/bar', 'foo/bar') > similarity('foo/bar', 'foo bar')
via o/b
and o b
trigrams being generated.
I had implemented my own trigram index in memory for an app, but need to move the fuzzy search to the database.
In my implementation I just split the input at symbol/whitespace boundaries and yielded trigrams individually for each word,
then had a second pass over all symbols and whitespaces that only yielded trigrams that contained a symbol or didn't begin or end with whitespace.
Failed make on trgm_gin.c:42:1: error: conflicting types for 'gin_extract_value_trgm'
When I try to make it, it fails
make USE_PGXS=1
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fPIC -I. -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trgm_op.o trgm_op.c
trgm_op.c:51:1: warning: no previous prototype for 'set_limit' [-Wmissing-prototypes]
set_limit(PG_FUNCTION_ARGS)
^
trgm_op.c:63:1: warning: no previous prototype for 'show_limit' [-Wmissing-prototypes]
show_limit(PG_FUNCTION_ARGS)
^
trgm_op.c:69:1: warning: no previous prototype for 'set_substring_limit' [-Wmissing-prototypes]
set_substring_limit(PG_FUNCTION_ARGS)
^
trgm_op.c:80:1: warning: no previous prototype for 'show_substring_limit' [-Wmissing-prototypes]
show_substring_limit(PG_FUNCTION_ARGS)
^
trgm_op.c:852:1: warning: no previous prototype for 'show_trgm' [-Wmissing-prototypes]
show_trgm(PG_FUNCTION_ARGS)
^
trgm_op.c:1027:1: warning: no previous prototype for 'similarity' [-Wmissing-prototypes]
similarity(PG_FUNCTION_ARGS)
^
trgm_op.c:1049:1: warning: no previous prototype for 'substring_similarity' [-Wmissing-prototypes]
substring_similarity(PG_FUNCTION_ARGS)
^
trgm_op.c:1065:1: warning: no previous prototype for 'similarity_dist' [-Wmissing-prototypes]
similarity_dist(PG_FUNCTION_ARGS)
^
trgm_op.c:1075:1: warning: no previous prototype for 'similarity_op' [-Wmissing-prototypes]
similarity_op(PG_FUNCTION_ARGS)
^
trgm_op.c:1085:1: warning: no previous prototype for 'substring_similarity_op' [-Wmissing-prototypes]
substring_similarity_op(PG_FUNCTION_ARGS)
^
trgm_op.c:1101:1: warning: no previous prototype for 'substring_similarity_commutator_op' [-Wmissing-prototypes]
substring_similarity_commutator_op(PG_FUNCTION_ARGS)
^
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fPIC -I. -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trgm_gist.o trgm_gist.c
trgm_gist.c:70:1: warning: no previous prototype for 'gtrgm_in' [-Wmissing-prototypes]
gtrgm_in(PG_FUNCTION_ARGS)
^
trgm_gist.c:77:1: warning: no previous prototype for 'gtrgm_out' [-Wmissing-prototypes]
gtrgm_out(PG_FUNCTION_ARGS)
^
trgm_gist.c:101:1: warning: no previous prototype for 'gtrgm_compress' [-Wmissing-prototypes]
gtrgm_compress(PG_FUNCTION_ARGS)
^
trgm_gist.c:145:1: warning: no previous prototype for 'gtrgm_decompress' [-Wmissing-prototypes]
gtrgm_decompress(PG_FUNCTION_ARGS)
^
trgm_gist.c:187:1: warning: no previous prototype for 'gtrgm_consistent' [-Wmissing-prototypes]
gtrgm_consistent(PG_FUNCTION_ARGS)
^
trgm_gist.c:438:1: warning: no previous prototype for 'gtrgm_distance' [-Wmissing-prototypes]
gtrgm_distance(PG_FUNCTION_ARGS)
^
trgm_gist.c:542:1: warning: no previous prototype for 'gtrgm_union' [-Wmissing-prototypes]
gtrgm_union(PG_FUNCTION_ARGS)
^
trgm_gist.c:575:1: warning: no previous prototype for 'gtrgm_same' [-Wmissing-prototypes]
gtrgm_same(PG_FUNCTION_ARGS)
^
trgm_gist.c:675:1: warning: no previous prototype for 'gtrgm_penalty' [-Wmissing-prototypes]
gtrgm_penalty(PG_FUNCTION_ARGS)
^
trgm_gist.c:781:1: warning: no previous prototype for 'gtrgm_picksplit' [-Wmissing-prototypes]
gtrgm_picksplit(PG_FUNCTION_ARGS)
^
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fPIC -I. -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o trgm_gin.o trgm_gin.c
trgm_gin.c:31:1: warning: no previous prototype for 'gin_extract_trgm' [-Wmissing-prototypes]
gin_extract_trgm(PG_FUNCTION_ARGS)
^
trgm_gin.c: In function 'gin_extract_trgm':
trgm_gin.c:34:3: warning: implicit declaration of function 'gin_extract_value_trgm' [-Wimplicit-function-declaration]
return gin_extract_value_trgm(fcinfo);
^
trgm_gin.c:36:3: warning: implicit declaration of function 'gin_extract_query_trgm' [-Wimplicit-function-declaration]
return gin_extract_query_trgm(fcinfo);
^
trgm_gin.c: At top level:
trgm_gin.c:42:1: warning: no previous prototype for 'gin_extract_value_trgm' [-Wmissing-prototypes]
gin_extract_value_trgm(PG_FUNCTION_ARGS)
^
trgm_gin.c:42:1: error: conflicting types for 'gin_extract_value_trgm'
trgm_gin.c:34:10: note: previous implicit declaration of 'gin_extract_value_trgm' was here
return gin_extract_value_trgm(fcinfo);
^
trgm_gin.c:77:1: warning: no previous prototype for 'gin_extract_query_trgm' [-Wmissing-prototypes]
gin_extract_query_trgm(PG_FUNCTION_ARGS)
^
trgm_gin.c:77:1: error: conflicting types for 'gin_extract_query_trgm'
trgm_gin.c:36:10: note: previous implicit declaration of 'gin_extract_query_trgm' was here
return gin_extract_query_trgm(fcinfo);
^
trgm_gin.c:174:1: warning: no previous prototype for 'gin_trgm_consistent' [-Wmissing-prototypes]
gin_trgm_consistent(PG_FUNCTION_ARGS)
^
trgm_gin.c:272:1: warning: no previous prototype for 'gin_trgm_triconsistent' [-Wmissing-prototypes]
gin_trgm_triconsistent(PG_FUNCTION_ARGS)
^
trgm_gin.c: In function 'gin_trgm_triconsistent':
trgm_gin.c:274:2: error: unknown type name 'GinTernaryValue'
GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
^
trgm_gin.c:274:29: error: 'GinTernaryValue' undeclared (first use in this function)
GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
^
trgm_gin.c:274:29: note: each undeclared identifier is reported only once for each function it appears in
trgm_gin.c:274:46: error: expected expression before ')' token
GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
^
trgm_gin.c:280:18: error: expected ';' before 'res'
GinTernaryValue res = GIN_MAYBE;
^
trgm_gin.c:281:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int32 i,
^
trgm_gin.c:297:21: error: 'GIN_FALSE' undeclared (first use in this function)
if (check[i] != GIN_FALSE)
^
trgm_gin.c:304:4: error: 'res' undeclared (first use in this function)
res = (nkeys == 0)
^
trgm_gin.c:306:10: error: 'GIN_MAYBE' undeclared (first use in this function)
? GIN_MAYBE : GIN_FALSE);
^
trgm_gin.c:360:2: warning: implicit declaration of function 'PG_RETURN_GIN_TERNARY_VALUE' [-Wimplicit-function-declaration]
PG_RETURN_GIN_TERNARY_VALUE(res);
^
trgm_gin.c:361:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [trgm_gin.o] Error 1
Doesn't work on 9.5.5, second test fails
Hi! Maybe I am missing something, but on my local PostgreSQL 9.5.5
instance it doesn't work. The installation goes through as expected, but when I run the tests the 2nd test fails. "HINT: No function matches the given name and argument types. You might need to add explicit type casts." When I try to call substring_similarity manually I get the same error. Is there a way to fix it? Will attach both output files.
regression.diffs.txt
regression.out.txt
UPD: local issue, make install tries to install to 9.6 folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.