git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 125bb6c)
'::' is no longer interpreted as a variable in a prepare statement.
Tue, 5 Oct 2004 10:48:37 +0000 (10:48 +0000)
Tue, 5 Oct 2004 10:48:37 +0000 (10:48 +0000)

diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index bc0c3af03e886607ec192b6445a6b0f8c4723530..824bee4118c1e56ff286ce7b9725f622316f218e 100644 (file)
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -1864,6 +1864,11 @@ Mon Sep 27 11:05:49 CEST 2004
- Synced parser.
- 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 compat library version to 1.2.
- Set ecpg library version to 4.2.
diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c
index f850b9c8f7f020b496404598c193e8cee16e46d9..b6e79c6bbb6b7dca39cb80f6380ee06a69e99624 100644 (file)
--- a/src/interfaces/ecpg/ecpglib/prepare.c
+++ b/src/interfaces/ecpg/ecpglib/prepare.c
@@ -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
#include "postgres_fe.h"
@@ -46,9 +46,14 @@ replace_variables(char *text)
if (!string && *ptr == ':')
{
- *ptr = '?';
- for (++ptr; *ptr && isvarchar(*ptr); ptr++)
- *ptr = ' ';
+ if (ptr[1]==':')
+ ptr+=2; /* skip '::' */
+ else
+ {
+ *ptr = '?';
+ for (++ptr; *ptr && isvarchar(*ptr); ptr++)
+ *ptr = ' ';
+ }
}
}
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /