Skip to content

Commit ce3b489

Browse files
committed
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.* ?
1 parent a50f2fd commit ce3b489

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/backend/parser/gram.y

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.156 2000/03/14 23:06:31 thomas Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.157 2000/03/15 05:31:55 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -5479,12 +5479,17 @@ mapTargetColumns(List *src, List *dst)
54795479
*
54805480
* Do not convert "float", since that is handled elsewhere
54815481
* for FLOAT(p) syntax.
5482+
*
5483+
* Converting "datetime" to "timestamp" is a temporary expedient for
5484+
* pre-7.0 to 7.0 compatibility; it should go away again someday.
54825485
*/
54835486
static char *
54845487
xlateSqlFunc(char *name)
54855488
{
54865489
if (!strcasecmp(name,"character_length"))
54875490
return "char_length";
5491+
else if (!strcasecmp(name,"datetime"))
5492+
return "timestamp";
54885493
else
54895494
return name;
54905495
} /* xlateSqlFunc() */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy