Commit 992e7dd4 authored by Bruce Momjian's avatar Bruce Momjian

Oops, plpgsql didn't have the datetime->timestamp and timespan->interval

mappings.  In fact, it had them backward because it was using the 6.5.*
code.  Copied them from parser/gram.y, so it is fixed now.  Looks like
our first 7.0.1 fix.  Oops, seems Tom has beat me to it as I was typing
this.
parent 37c652f8
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.19 2000/04/16 04:16:55 tgl Exp $ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.20 2000/05/11 04:00:00 momjian Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
...@@ -1355,17 +1355,21 @@ plpgsql_yyerror(const char *s) ...@@ -1355,17 +1355,21 @@ plpgsql_yyerror(const char *s)
static char * static char *
xlateSqlType(char *name) xlateSqlType(char *name)
{ {
if (!strcasecmp(name, "int") if ((strcmp(name,"int") == 0)
|| !strcasecmp(name, "integer")) || (strcmp(name,"integer") == 0))
return "int4"; return "int4";
else if (!strcasecmp(name, "smallint")) else if (strcmp(name, "smallint") == 0)
return "int2"; return "int2";
else if (!strcasecmp(name, "real") else if ((strcmp(name, "real") == 0)
|| !strcasecmp(name, "float")) || (strcmp(name, "float") == 0))
return "float8"; return "float8";
else if (!strcasecmp(name, "interval")) else if (strcmp(name, "decimal") == 0)
return "timespan"; return "numeric";
else if (!strcasecmp(name, "boolean")) else if (strcmp(name, "datetime") == 0)
return "timestamp";
else if (strcmp(name, "timespan") == 0)
return "interval";
else if (strcmp(name, "boolean") == 0)
return "bool"; return "bool";
else else
return name; return name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment