Re: WITH clause - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: WITH clause
Date
Msg-id 200312121947.26443.peter_e@gmx.net
Whole thread Raw
In response to WITH clause  (David Fetter <david@fetter.org>)
Responses Re: WITH clause
List pgsql-hackers
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.
>
> WITH res = match (x.foo, '([0-9]+)x([0-9]+)')
> SELECT *
> FROM x
> WHERE y = res[2]
> OR    y = res[3];

Two questions:

1. What does this have to do with the SQL WITH clause?

2. How does the generalize to arbitrary user-defined operators?



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: WITH clause
Next
From: Tom Lane
Date:
Subject: Re: WITH clause