pg_trgm module: no convertion into Trigrams on one side when comparing - Mailing list pgsql-general

From Janek Sendrowski
Subject pg_trgm module: no convertion into Trigrams on one side when comparing
Date
Msg-id trinity-9c2d1528-5cc4-410d-ae7b-efc75fd10887-1384364270674@3capp-webde-bs17
Whole thread Raw
Responses Re: pg_trgm module: no convertion into Trigrams on one side when comparing
List pgsql-general
Hi,
I'm using the pg_trgm module,
Is there a possibility not to convert one side of the string when comparing?
I need a kind of reference string containing only certain trigrams.
It's not possible to build every kind of string using the function.

example:
Code: Alles auswählen
SELECT show_trgm('abc');
show_trgm
-------------------------
{" a"," ab",abc,"bc "}
(1 row)

But I like to have only {'abc'} for example.

I would use this function: "similarity(text, text)"
Could it somehow work with explicit data-type definitions or maybe with putting the string in brackets or quoting?
Or do I have to change the source code?

Thanks for your help

Janek Sendrowski


pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Theory question
Next
From: Jeff Janes
Date:
Subject: Re: Partitioned table question