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 (<[EMAIL PROTECTED]>) Maybe there's lots of data loss but the records of data loss are also lost. (Lincoln Yeoh) ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org