mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
'::' is no longer interpreted as a variable in a prepare statement.
This commit is contained in:
@@ -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"
|
||||||
@@ -46,9 +46,14 @@ replace_variables(char *text)
|
|||||||
|
|
||||||
if (!string && *ptr == ':')
|
if (!string && *ptr == ':')
|
||||||
{
|
{
|
||||||
*ptr = '?';
|
if (ptr[1]==':')
|
||||||
for (++ptr; *ptr && isvarchar(*ptr); ptr++)
|
ptr+=2; /* skip '::' */
|
||||||
*ptr = ' ';
|
else
|
||||||
|
{
|
||||||
|
*ptr = '?';
|
||||||
|
for (++ptr; *ptr && isvarchar(*ptr); ptr++)
|
||||||
|
*ptr = ' ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user