pg_trgm module: no convertion into Trigrams on one side when comparing

From: "Janek Sendrowski" <janek12(at)web(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_trgm module: no convertion into Trigrams on one side when comparing
Date: 2013-11-13 17:37:50
Message-ID: trinity-9c2d1528-5cc4-410d-ae7b-efc75fd10887-1384364270674@3capp-webde-bs17
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-11-13 17:43:00 Re: Clang 3.3 Analyzer Results
Previous Message Jeff Janes 2013-11-13 16:46:41 Re: Theory question