Add 'datetime' -> 'timestamp' conversion to xlateSqlFunc() to ease
the pain of updating apps to 7.0. Should we also translate some of the 'datetime_foo' functions that exist in 6.* ?
This commit is contained in:
parent
a50f2fd76e
commit
ce3b489b97
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.156 2000/03/14 23:06:31 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.157 2000/03/15 05:31:55 tgl Exp $
|
||||||
*
|
*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* AUTHOR DATE MAJOR EVENT
|
* AUTHOR DATE MAJOR EVENT
|
||||||
@ -5479,12 +5479,17 @@ mapTargetColumns(List *src, List *dst)
|
|||||||
*
|
*
|
||||||
* Do not convert "float", since that is handled elsewhere
|
* Do not convert "float", since that is handled elsewhere
|
||||||
* for FLOAT(p) syntax.
|
* for FLOAT(p) syntax.
|
||||||
|
*
|
||||||
|
* Converting "datetime" to "timestamp" is a temporary expedient for
|
||||||
|
* pre-7.0 to 7.0 compatibility; it should go away again someday.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
xlateSqlFunc(char *name)
|
xlateSqlFunc(char *name)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(name,"character_length"))
|
if (!strcasecmp(name,"character_length"))
|
||||||
return "char_length";
|
return "char_length";
|
||||||
|
else if (!strcasecmp(name,"datetime"))
|
||||||
|
return "timestamp";
|
||||||
else
|
else
|
||||||
return name;
|
return name;
|
||||||
} /* xlateSqlFunc() */
|
} /* xlateSqlFunc() */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user