Re: WITH clause

Поиск
Список
Период
Сортировка
От Alvaro Herrera Munoz
Тема Re: WITH clause
Дата
Msg-id 20031212190754.GA11548@dcc.uchile.cl
обсуждение исходный текст
Ответ на WITH clause  (David Fetter <david@fetter.org>)
Ответы Re: WITH clause  (david@fetter.org (David Fetter))
Список pgsql-hackers
On Fri, Dec 12, 2003 at 10:13:56AM -0800, David Fetter wrote:

> I'm looking to the SQL WITH clause as a way to get better regex
> support in PostgreSQL.  I've been chatting a little bit about this,
> and here's an idea for a behavior.  Implementation details TBD.

I think you could be rather looking at keeping the regmatch_t * from
RE_compile_and_execute somewhere in the TopTransactionContext, and
create accessor functions to it.  You could do

BEGIN;
SELECT ... x ~ '([0-9]+)x([0-9]+)';
SELECT regex_parens(1), regex_parens(2);
COMMIT;

Etc, you get the idea.  Of course you could only access the captured
expressions from the last regex, and only within the same transaction
block.

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
Maybe there's lots of data loss but the records of data loss are also lost.
(Lincoln Yeoh)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Resurrecting pg_upgrade
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: Re: 7.4 build problem on Linux Vserver