Help: Using a regular expression match as a value - Mailing list pgsql-sql

From Richard DeVenezia
Subject Help: Using a regular expression match as a value
Date
Msg-id 023401c03b69$bcc55df0$0101a8c0@supermicro
Whole thread Raw
Responses Re: Help: Using a regular expression match as a value
List pgsql-sql
I am just getting started with pgsql and have read available docs I can
find.

I know I can match a row in a where clause using a regular expression.

How can I use what was regexp matched (e.g. perl $1,$2, etc...) as a column
assignment ?

I'm looking for something like this?
select ...
...
$1 of firstname, /^R.*d/ as name_starts_with_r_and_ends_with_d
...

TIA

Richard DeVenezia



pgsql-sql by date:

Previous
From: najm Hashmi
Date:
Subject: Need info: pl/pgsql performance
Next
From: Craig May
Date:
Subject: Postgresql Site Search