> btw pg_escape_literal is mis-named. it does not escape - it quotes. > And there is an important difference between escaping and quoting, > at least for SQLite, it is impossible to make a binary-safe escape() > function, > but it's fully possible to make a binary-safe quote() function > (see https://github.com/php/php-src/pull/13972 ) > > IMO pg_escape_literal should be renamed pg_quote_literal. >
A deviation, but this triggers my naming concern with preg_quote(). It doesn't quote anything, it escapes things; and it should be able to process an array of strings! I dream of a future with a robust preg_escape() in it. mickmackusa >
