mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
'::' is no longer interpreted as a variable in a prepare statement.
This commit is contained in:
@ -1864,6 +1864,11 @@ Mon Sep 27 11:05:49 CEST 2004
|
|||||||
|
|
||||||
- Synced parser.
|
- Synced parser.
|
||||||
- Removed Oracle transaction syntax to fix shift/reduce error.
|
- Removed Oracle transaction syntax to fix shift/reduce error.
|
||||||
|
|
||||||
|
Tue Oct 5 12:45:48 CEST 2004
|
||||||
|
|
||||||
|
- '::' is no longer interpreted as a variable in a prepare statement.
|
||||||
|
Added patch by Daniel Verite to fix this.
|
||||||
- Set ecpg version to 3.2.0.
|
- Set ecpg version to 3.2.0.
|
||||||
- Set compat library version to 1.2.
|
- Set compat library version to 1.2.
|
||||||
- Set ecpg library version to 4.2.
|
- Set ecpg library version to 4.2.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.12 2004/05/21 13:50:12 meskes Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.13 2004/10/05 10:48:37 meskes Exp $ */
|
||||||
|
|
||||||
#define POSTGRES_ECPG_INTERNAL
|
#define POSTGRES_ECPG_INTERNAL
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
@ -45,12 +45,17 @@ 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++)
|
||||||
*ptr = ' ';
|
*ptr = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle the EXEC SQL PREPARE statement */
|
/* handle the EXEC SQL PREPARE statement */
|
||||||
|
Reference in New Issue
Block a user