Thread

  1. SIMILAR TO

    Peter Eisentraut <peter_e@gmx.net> — 2002-09-07T16:15:44Z

    SIMILAR TO doesn't implement the SQL standard, it's only a wrapper around
    the POSIX regexp matching, which is wrong.  I thought someone wanted to
    fix that, but if it's not happening it should be removed.
    
    -- 
    Peter Eisentraut   peter_e@gmx.net
    
    
    
  2. Re: SIMILAR TO

    lockhart@fourpalms.org — 2002-09-08T00:17:01Z

    > SIMILAR TO doesn't implement the SQL standard, it's only a wrapper around
    > the POSIX regexp matching, which is wrong.  I thought someone wanted to
    > fix that, but if it's not happening it should be removed.
    
    Please be specific on what you would consider correct. I'm not recalling
    any details of past discussions so need some background.
    
    I see mention in my SQL99 docs of escape characters for "similar
    pattern" which would suggest that it resembles Posix regexp matching. I
    don't have the code in front of me to check on the details of the
    current implementation, but I'd hope that you have something helpful to
    say on what a better implementation would be.
    
    Regards.
    
                     - Tom
    
    
  3. Re: SIMILAR TO

    Peter Eisentraut <peter_e@gmx.net> — 2002-09-09T18:41:19Z

    Thomas Lockhart writes:
    
    > > SIMILAR TO doesn't implement the SQL standard, it's only a wrapper around
    > > the POSIX regexp matching, which is wrong.  I thought someone wanted to
    > > fix that, but if it's not happening it should be removed.
    >
    > Please be specific on what you would consider correct. I'm not recalling
    > any details of past discussions so need some background.
    
    The pattern that should be accepted by SIMILAR TO (as defined in SQL99
    part 2 clause 8.6) and the POSIX regular expressions that it accepts now
    are not the same.
    
    -- 
    Peter Eisentraut   peter_e@gmx.net
    
    
    
  4. Re: SIMILAR TO

    Bruce Momjian <pgman@candle.pha.pa.us> — 2002-09-11T04:24:17Z

    Is this a TODO?
    
    ---------------------------------------------------------------------------
    
    Peter Eisentraut wrote:
    > Thomas Lockhart writes:
    > 
    > > > SIMILAR TO doesn't implement the SQL standard, it's only a wrapper around
    > > > the POSIX regexp matching, which is wrong.  I thought someone wanted to
    > > > fix that, but if it's not happening it should be removed.
    > >
    > > Please be specific on what you would consider correct. I'm not recalling
    > > any details of past discussions so need some background.
    > 
    > The pattern that should be accepted by SIMILAR TO (as defined in SQL99
    > part 2 clause 8.6) and the POSIX regular expressions that it accepts now
    > are not the same.
    > 
    > -- 
    > Peter Eisentraut   peter_e@gmx.net
    > 
    > 
    > ---------------------------(end of broadcast)---------------------------
    > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
    > 
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 359-1001
      +  If your life is a hard drive,     |  13 Roberts Road
      +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
    
    
  5. Re: SIMILAR TO

    Peter Eisentraut <peter_e@gmx.net> — 2002-09-11T18:15:33Z

    Bruce Momjian writes:
    
    > Is this a TODO?
    
    It's a must-fix for 7.3, but frankly I don't see how we could justify
    making the required extensive changes during beta.  I suggest that we keep
    the parser support and throw an error when it's invoked.
    
    -- 
    Peter Eisentraut   peter_e@gmx.net