Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix postgis_proc_set_search_path.pl to handle complex defaults quotes #515

Closed
wants to merge 1 commit into from

Commits on Nov 14, 2019

  1. Fix postgis_proc_set_search_path.pl to handle complex defaults quotes

    As discovered in postgis#514,
    an argument default with parenthesis instide the string breaks
    regression sql generator (evil regexes).  Fixed with more evil regexes:
    now it has a special handling for a '...' -- ignoring all chars inside.
    
    Escaping is not handled (doesn't seem like PostGIS has any of them)
    
    Example:
    
    The script can now convert this:
    
    CREATE OR REPLACE FUNCTION ST_TileEnvelope(zoom integer, x integer, y integer, margin float8, bounds geometry DEFAULT 'SRID=3857;LINESTRING(-20037508.342789 -20037508.342789, 20037508.342789 20037508.342789)'::geometry)
    
    into this:
    
    ST_TileEnvelope(zoom integer, x integer, y integer, bounds geometry)
    nyurik committed Nov 14, 2019
    Configuration menu
    Copy the full SHA
    f97c19e View commit details
    Browse the repository at this point in the history