Skip to content

Commit

Permalink
Initial proof-of-concept for handling escaped question mark placeholders
Browse files Browse the repository at this point in the history
Obviously needs tests etc.
  • Loading branch information
Tim Bunce committed Dec 27, 2014
1 parent 0599be6 commit 54358c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dbdimp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,14 @@ static void pg_st_split_statement (pTHX_ imp_sth_t * imp_sth, int version, char
else if (! imp_sth->dollaronly) {
/* Question mark style */
if ('?' == ch) {
if ('\\' == oldch) { /* Is escaped */
/* remove (copy down over) the backslash and ignore the question mark */
unsigned char *p = statement-2;
while(*p++) {
*(p-1) = *p;
}
continue;
}
placeholder_type = 1;
}
/* Colon style */
Expand Down

0 comments on commit 54358c7

Please sign in to comment.