Apparently the BIND_PARAMS regex passes over double colons,
it just doesn't accommodate for a bound parameter in that case.
add this use case to current tests as people can be relying upon it.
Change-Id: I6555621b1bb05d09b17428f4b4094ff7b219b460
dialect="postgresql",
)
+ def test_double_colons_dont_actually_need_escaping(self):
+ # this is news to me. bound param won't work but you can put the
+ # double colons in
+ self.assert_compile(
+ text(
+ r"SELECT * FROM pg_attribute WHERE "
+ r"attrelid = foo::regclass"
+ ),
+ "SELECT * FROM pg_attribute WHERE " "attrelid = foo::regclass",
+ params={},
+ dialect="postgresql",
+ )
+
def test_text_in_select_nonfrom(self):
generate_series = text(