mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 06:06:00 -06:00
Fixed quoting for PGSQL dialect
git-svn-id: svn://ultimatepp.org/upp/trunk@564 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e3f30f12b5
commit
4026460776
1 changed files with 8 additions and 3 deletions
|
|
@ -134,9 +134,14 @@ void SqlCompile(const char *&s, StringBuffer *r, byte dialect)
|
|||
}
|
||||
r->Cat('\'');
|
||||
for(const char *q = x; *q; q++) {
|
||||
if(*q == '\'')
|
||||
r->Cat(dialect == MY_SQL ? "\\\'" : "\'\'");
|
||||
else {
|
||||
if(*q == '\'') {
|
||||
if(dialect == MY_SQL)
|
||||
r->Cat("\\\'");
|
||||
else if(dialect == PGSQL)
|
||||
r->Cat("\\'");
|
||||
else
|
||||
r->Cat("\'\'");
|
||||
} else {
|
||||
if((*q == '\"' || *q == '\\') && dialect == MY_SQL)
|
||||
r->Cat('\\');
|
||||
r->Cat(*q);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue