Syntax for wildcard selection

From: Scott Holmes <sholmes(at)pacificnet(dot)net>
To: pgsql-general(at)postgresql(dot)org (PG-General)
Subject: Syntax for wildcard selection
Date: 2001-08-15 23:06:16
Message-ID: 200108152306.QAA01448@scotts.mynetwork.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This question just came up from a user use to our Informix application. They
tried to do a wildcard search, thus "where field_name LIKE 'AB%VN'". The
trailing values (after the %) are not recognized correctly. With Informix
4GL, we wrote "where field_name MATCHES 'AB*VN'". This finds any combination
of values with 'AB' as the first two characters, and 'VN' as the last two,
with any number of characters in between - including blanks. How is this
accomplished with PostgreSQL? Are we limited to wildcard searches as "where
field_name LIKE 'AB%'"?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Turner 2001-08-15 23:36:14 Re: Syntax for wildcard selection
Previous Message Peter Eisentraut 2001-08-15 22:54:44 Re: OpenBSD 2.9 - installation works fine but psql won't run