Support SUBSTRING(X FROM Y[ FOR Z]) on PostgreSQL

Issue #2676 resolved
Former user created an issue

The Firebird dialect compiles {{func.substring(x, yz)}} to {{SUBSTRING(X FROM Y[ FOR Z])}}. I'd like to do the same for PostgreSQL. Will post a patch.

Comments (7)

  1. Former user Account Deleted

    Same patch applies with minimal fuzz to default (do you still want separate patch files in such cases?)

  2. Mike Bayer repo owner

    seems like PG9 doesn't need the extra words:

    test=> select substring('foobar' from '%#"o_b#"%' for '#')
    test-> ;
     substring 
    -----------
     oob
    (1 row)
    
    test=> select substring('foobar', '%#"o_b#"%', '#')
    ;
     substring 
    -----------
     oob
    (1 row)
    

    trying to see what version i should document this as necessary for.

  3. Log in to comment