Support SUBSTRING(X FROM Y[ FOR Z]) on PostgreSQL
Issue #2676
resolved
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)
-
Account Deleted -
Account Deleted Same patch applies with minimal fuzz to default (do you still want separate patch files in such cases?)
-
repo owner - changed milestone to 0.8.0final
i think its fine, how far back does SUBSTRING go for PG versions ?
-
Account Deleted Back to at least 7.1 for integers http://www.postgresql.org/docs/7.1/static/functions-string.html ... regexp variant was added in 7.3 http://www.postgresql.org/docs/7.3/static/functions-string.html
-
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.
-
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.8.0final (automated comment)
- Log in to comment
Simple patch against rel_0_7 tip, copying code from firebird dialect