'::' is no longer interpreted as a variable in a prepare statement.
This commit is contained in:
parent
0ed57c310c
commit
3ff8e83231
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.9.4.1 2004/01/28 09:55:53 meskes Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.9.4.2 2004/10/05 10:48:45 meskes Exp $ */
|
||||||
|
|
||||||
#define POSTGRES_ECPG_INTERNAL
|
#define POSTGRES_ECPG_INTERNAL
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
@ -45,6 +45,10 @@ replace_variables(char *text)
|
|||||||
string = string ? false : true;
|
string = string ? false : true;
|
||||||
|
|
||||||
if (!string && *ptr == ':')
|
if (!string && *ptr == ':')
|
||||||
|
{
|
||||||
|
if (ptr[1]==':')
|
||||||
|
ptr+=2; /* skip '::' */
|
||||||
|
else
|
||||||
{
|
{
|
||||||
*ptr = '?';
|
*ptr = '?';
|
||||||
for (++ptr; *ptr && isvarchar(*ptr); ptr++)
|
for (++ptr; *ptr && isvarchar(*ptr); ptr++)
|
||||||
@ -52,6 +56,7 @@ replace_variables(char *text)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* handle the EXEC SQL PREPARE statement */
|
/* handle the EXEC SQL PREPARE statement */
|
||||||
bool
|
bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user