Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
efac2796
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
efac2796
编写于
2月 15, 2008
作者:
M
Michael Meskes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Changed the way symbols are defined in C in INFORMIX mode.
上级
df1e965e
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
19 addition
and
41 deletion
+19
-41
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/include/datetime.h
src/interfaces/ecpg/include/datetime.h
+4
-3
src/interfaces/ecpg/include/decimal.h
src/interfaces/ecpg/include/decimal.h
+3
-2
src/interfaces/ecpg/include/ecpg_informix.h
src/interfaces/ecpg/include/ecpg_informix.h
+6
-1
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+2
-35
未找到文件。
src/interfaces/ecpg/ChangeLog
浏览文件 @
efac2796
...
...
@@ -2313,3 +2313,7 @@ Thu, 14 Feb 2008 13:11:34 +0100
- EXECUTE can return NOT FOUND so it should be checked here too.
- Changed regression test accordingly.
Fri, 15 Feb 2008 12:01:13 +0100
- Changed the way symbols are defined in C in INFORMIX mode.
src/interfaces/ecpg/include/datetime.h
浏览文件 @
efac2796
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/datetime.h,v 1.1
4 2008/02/14 12:27:26
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/datetime.h,v 1.1
5 2008/02/15 11:20:21
meskes Exp $ */
#ifndef _ECPG_DATETIME_H
#define _ECPG_DATETIME_H
#include <ecpg_informix.h>
typedef
timestamp
dtime_t
;
typedef
interval
intrvl_t
;
/* brought in by ecpg_informix.h nowadays
* typedef timestamp dtime_t;
* typedef interval intrvl_t; */
#endif
/* ndef _ECPG_DATETIME_H */
src/interfaces/ecpg/include/decimal.h
浏览文件 @
efac2796
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/decimal.h,v 1.1
6 2008/02/14 12:27:26
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/include/decimal.h,v 1.1
7 2008/02/15 11:20:21
meskes Exp $ */
#ifndef _ECPG_DECIMAL_H
#define _ECPG_DECIMAL_H
#include <ecpg_informix.h>
typedef
decimal
dec_t
;
/* brought in by ecpg_informix.h nowadays
* typedef decimal dec_t; */
#endif
/* ndef _ECPG_DECIMAL_H */
src/interfaces/ecpg/include/ecpg_informix.h
浏览文件 @
efac2796
/*
* This file contains stuff needed to be as compatible to Informix as possible.
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.2
0 2008/02/14 12:27:26
meskes Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.2
1 2008/02/15 11:20:21
meskes Exp $
*/
#ifndef _ECPG_INFORMIX_H
#define _ECPG_INFORMIX_H
...
...
@@ -82,6 +82,11 @@ extern int dttofmtasc(timestamp *, char *, int, char *);
extern
int
intoasc
(
interval
*
,
char
*
);
extern
int
dtcvfmtasc
(
char
*
,
char
*
,
timestamp
*
);
/* we also define Informix datatypes here */
typedef
timestamp
dtime_t
;
typedef
interval
intrvl_t
;
typedef
decimal
dec_t
;
#ifdef __cplusplus
}
#endif
...
...
src/interfaces/ecpg/preproc/pgc.l
浏览文件 @
efac2796
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.16
1 2008/02/14 12:27:26
meskes Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.16
2 2008/02/15 11:20:21
meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -47,7 +47,6 @@ static void addlitchar (unsigned char);
static void parse_include (void);
static bool ecpg_isspace(char ch);
static bool isdefine(void);
static bool isinformixdefine(void);
char *token_start;
int state_before;
...
...
@@ -744,9 +743,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
<C>{identifier} {
const ScanKeyword *keyword;
/* Informix uses SQL defines only in SQL space */
/* however, some defines have to be taken care of for compatibility */
if ((!INFORMIX_MODE || !isinformixdefine()) && !isdefine())
if (!isdefine())
{
keyword = ScanCKeywordLookup(yytext);
if (keyword != NULL)
...
...
@@ -1318,36 +1315,6 @@ static bool isdefine(void)
return false;
}
static bool isinformixdefine(void)
{
const char *new = NULL;
if (strcmp(yytext, "dec_t") == 0)
new = "decimal";
else if (strcmp(yytext, "intrvl_t") == 0)
new = "interval";
else if (strcmp(yytext, "dtime_t") == 0)
new = "timestamp";
if (new)
{
struct _yy_buffer *yb;
yb = mm_alloc(sizeof(struct _yy_buffer));
yb->buffer = YY_CURRENT_BUFFER;
yb->lineno = yylineno;
yb->filename = mm_strdup(input_filename);
yb->next = yy_buffer;
yy_buffer = yb;
yy_scan_string(new);
return true;
}
return false;
}
/*
* Called before any actual parsing is done
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录