How to use like with a list - Mailing list pgsql-general

From Gauthier, Dave
Subject How to use like with a list
Date
Msg-id 482E80323A35A54498B8B70FF2B8798004D5F424A2@azsmsx504.amr.corp.intel.com
Whole thread Raw
Responses Re: How to use like with a list  ("David Johnston" <polobo@yahoo.com>)
Re: How to use like with a list  (John R Pierce <pierce@hogranch.com>)
List pgsql-general

Hi:

 

How can I search on a csv list of values using "like" where each value is to be appended with a wildcarded string?

 

Example:

 

list = 'jo,mo,do,fo'

I want to pull all names from a table with name like..  'jol%' or 'mol%' or'dol%' or 'sol%'

would match "jolly, molly, moleman,dollface, solarboy"

 

notice they all have the same "l%' wildcarded suffix.

 

I'm really not that lazy, just trying to keep this in a simgle query in order to minimize network hits which will reduce overall wallclock performance.  This thing wil be running in a programming loop.

 

Thanks in Advance !

pgsql-general by date:

Previous
From: jonesd@xmission.com
Date:
Subject: Upgrading from 8.3.14 to 8.3.16 on Windows
Next
From: "Andrus"
Date:
Subject: How to install latest stable postgresql on Debian