Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23e4fc1

Browse files
author
Michael Meskes
committed
Fixed informix behaviour for select without into.
1 parent79fafdf commit23e4fc1

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,11 @@ Tue Jul 1 11:57:56 CEST 2003
15411541
- Added a new data type "decimal" which is mostly the same as our
15421542
"numeric" but uses a fixed length array to store the digits. This is
15431543
for compatibility with Informix and maybe others.
1544+
1545+
Wed Jul 2 09:45:59 CEST 2003
1546+
1547+
- Fixed initialization bug in compatlib.
1548+
- Added postgres_fe.h to all files in pgtypeslib.
15441549
- Set ecpg version to 3.0.0
15451550
- Set ecpg library to 4.0.0
15461551
- Set pgtypes library to 1.0.0

‎src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.14 2003/07/01 12:40:51 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.15 2003/07/04 11:30:48 meskes Exp $ */
22

33
/*
44
* The aim is to get a simpler inteface to the database routines.
@@ -1173,15 +1173,16 @@ ECPGexecute(struct statement * stmt)
11731173
else
11741174
for (act_field=0;act_field<nfields&&status;act_field++)
11751175
{
1176-
if (var==NULL)
1176+
if (var!=NULL)
1177+
{
1178+
status=ECPGstore_result(results,act_field,stmt,var);
1179+
var=var->next;
1180+
}
1181+
elseif (!INFORMIX_MODE(stmt->compat))
11771182
{
11781183
ECPGraise(stmt->lineno,ECPG_TOO_FEW_ARGUMENTS,NULL);
11791184
return (false);
11801185
}
1181-
1182-
status=ECPGstore_result(results,act_field,stmt,var);
1183-
1184-
var=var->next;
11851186
}
11861187

11871188
if (status&&var!=NULL)

‎src/interfaces/ecpg/test/test_informix.pgc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ int main()
4747
$delete from test where i=:n;
4848
printf("delete: %ld\n", sqlca.sqlcode);
4949

50+
$select 1 from test where i=14;
51+
printf("Exists: %ld\n", sqlca.sqlcode);
52+
53+
$select 1 from test where i=147;
54+
printf("Does not exist: %ld\n", sqlca.sqlcode);
55+
5056
$commit;
5157
$drop table test;
5258
$commit;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp