Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-20 Thread David E. Wheeler
On Jun 19, 2011, at 4:56 PM, Florian Pflug wrote: Hm, it seems we either all have different idea about how such a pattern type would be be defined, or have grown so accustomed to pg's type system that we've forgotten how powerful it really is ;-) (For me, the latter is surely true...).

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-20 Thread Florian Pflug
On Jun20, 2011, at 18:28 , David E. Wheeler wrote: I don't suppose there's a special quoting to be had for patterns? Perhaps one of these (modulo SQL parsing issues); /pattern/ {pattern} qr/pattern/ qr'pattern' R/pattern/ R'pattern' Pretty daring suggestion, I must

[HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Florian Pflug
Hi It looks like we've failed to reach an agreement on how to proceed on the issue with missing commutators for the various text matching operators (~, ~~, and their case-insensitive variants). We do seem to have agreed, however, that adding commutators for the non-deprecated operators which lack

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Robert Haas
On Sun, Jun 19, 2011 at 9:53 AM, Florian Pflug f...@phlo.org wrote: Amidst the discussion, Alvaro suggested that we resolve the issue by adding a distinct type for patterns as opposed to text. That'd allow us to make ~ it's own commutator by defining both  text ~ pattern and  pattern ~ text.

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Florian Pflug
On Jun19, 2011, at 20:56 , Robert Haas wrote: On Sun, Jun 19, 2011 at 9:53 AM, Florian Pflug f...@phlo.org wrote: Amidst the discussion, Alvaro suggested that we resolve the issue by adding a distinct type for patterns as opposed to text. That'd allow us to make ~ it's own commutator by

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Andrew Dunstan
On 06/19/2011 02:56 PM, Robert Haas wrote: On Sun, Jun 19, 2011 at 9:53 AM, Florian Pflugf...@phlo.org wrote: Amidst the discussion, Alvaro suggested that we resolve the issue by adding a distinct type for patterns as opposed to text. That'd allow us to make ~ it's own commutator by defining

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 06/19/2011 02:56 PM, Robert Haas wrote: On Sun, Jun 19, 2011 at 9:53 AM, Florian Pflugf...@phlo.org wrote: Amidst the discussion, Alvaro suggested that we resolve the issue by adding a distinct type for patterns as opposed to text. That'd allow

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Florian Pflug
On Jun19, 2011, at 22:10 , Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 06/19/2011 02:56 PM, Robert Haas wrote: On Sun, Jun 19, 2011 at 9:53 AM, Florian Pflugf...@phlo.org wrote: Amidst the discussion, Alvaro suggested that we resolve the issue by adding a distinct type for

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Andrew Dunstan
On 06/19/2011 05:02 PM, Florian Pflug wrote: On Jun19, 2011, at 22:10 , Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: On 06/19/2011 02:56 PM, Robert Haas wrote: On Sun, Jun 19, 2011 at 9:53 AM, Florian Pflugf...@phlo.org wrote: Amidst the discussion, Alvaro suggested that we

Re: [HACKERS] Adding a distinct pattern type to resolve the ~ commutator stalemate

2011-06-19 Thread Florian Pflug
On Jun20, 2011, at 00:56 , Andrew Dunstan wrote: On 06/19/2011 05:02 PM, Florian Pflug wrote: The only argument against that I can see is that it poses a compatibility problem if ~ remains the pattern matching operator. I do believe, however, that the chance of unknown ~ unknown appearing