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? ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match