Remove date cast(::date) from the conversion of {d escape before
authorHiroshi Inoue <inoue@tpf.co.jp>
Tue, 27 May 2003 23:23:41 +0000 (23:23 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Tue, 27 May 2003 23:23:41 +0000 (23:23 +0000)
7.3 servers. 7.2 servers are poor in implicit cast from date ->
timestamp without time zone.

convert.c
version.h

index 5cf25f62d7054f1e8ab90a67c62d4d5380ee531f..959ee6eca2c9646fd4b6e5f3dc73ea18146ecbce 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -3137,7 +3137,10 @@ convert_escape(QueryParse *qp, QueryBuild *qb)
    {
        /* Literal; return the escape part adding type cast */
        F_ExtractOldTo(qp, buf_small, '}', sizeof(buf_small));
-       prtlen = snprintf(buf, sizeof(buf), "%s::date ", buf_small);
+       if (PG_VERSION_LT(qb->conn, 7.3))
+           prtlen = snprintf(buf, sizeof(buf), "%s ", buf_small);
+       else
+           prtlen = snprintf(buf, sizeof(buf), "%s::date ", buf_small);
        CVT_APPEND_DATA(qb, buf, prtlen);
    }
    else if (strcmp(key, "t") == 0)
index 68ddd40ade4de00cbbaa466bbdbedea3c6b79f62..f0bff6999d67318f02e43df19831f48ee30da495 100644 (file)
--- a/version.h
+++ b/version.h
@@ -9,8 +9,8 @@
 #ifndef __VERSION_H__
 #define __VERSION_H__
 
-#define POSTGRESDRIVERVERSION      "07.03.0104"
-#define POSTGRES_RESOURCE_VERSION  "07.03.0104\0"
-#define PG_DRVFILE_VERSION     7,3,1,04
+#define POSTGRESDRIVERVERSION      "07.03.0105"
+#define POSTGRES_RESOURCE_VERSION  "07.03.0105\0"
+#define PG_DRVFILE_VERSION     7,3,1,05
 
 #endif