Re: [GENERAL] Pattern matching ints

2015-01-26 Thread Tim Smith
Ian, Re: However you might find the pg_trgm extension [1] useful: Indeed... pretty awesome. Thanks ! On 26 January 2015 at 12:55, Ian Barwick wrote: > On 26/01/15 20:32, Tim Smith wrote: >> Hi, >> >> Is there a more efficient way to pattern match integer columns other >> than something like :

Re: [GENERAL] Pattern matching ints

2015-01-26 Thread Ian Barwick
On 26/01/15 20:32, Tim Smith wrote: > Hi, > > Is there a more efficient way to pattern match integer columns other > than something like : > > where cast(mynumber as text) ~ '.*123.*' > > > I also seem to recall you can't create indexes on casts either ? This is perfectly possible: postgr

Re: [GENERAL] Pattern matching ints

2015-01-26 Thread Albe Laurenz
Tim Smith wrote: > Is there a more efficient way to pattern match integer columns other > than something like : > > where cast(mynumber as text) ~ '.*123.*' > > > I also seem to recall you can't create indexes on casts either ? I don't think you can do this without converting the column to a st

[GENERAL] Pattern matching ints

2015-01-26 Thread Tim Smith
Hi, Is there a more efficient way to pattern match integer columns other than something like : where cast(mynumber as text) ~ '.*123.*' I also seem to recall you can't create indexes on casts either ? Thx Tim -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch