using result as part of regular expression - Mailing list pgsql-general

From larry a price
Subject using result as part of regular expression
Date
Msg-id Pine.GSU.4.21.0104121236550.23319-100000@garcia.efn.org
Whole thread Raw
Responses Re: using result as part of regular expression
List pgsql-general
what i want to do is relatively simple, i have two tables which have some
information in common except that the 2nd table's name attribute was
truncated and is in lower case.

what i'd like to be able to do is something like

SELECT table1.name,table2.web,table2.email
WHERE table1.name LIKE upper(table2.name).'%';
                    ^^^^^^ trying for
                    'content%'
in other words if table2.name is 'Some Charitable Org' i'd want to pass it
to the comparison function as 'SOME CHARITABLE ORG%' so it would match
'SOME CHARITABLE ORGANISATION' in table1.name.

I've been looking through the docs and the book (momjian) but can't seem
to find the bit of syntax i need.

Thanks in advance,
larry

Larry Price      |  "We have seen the truth.
laprice@efn.org  |   And the truth makes no sense." -chesterton
_______________________________________________________________



pgsql-general by date:

Previous
From: "Howard Williams"
Date:
Subject:
Next
From: Peter Eisentraut
Date:
Subject: Re: using result as part of regular expression