]> granicus.if.org Git - postgresql/commitdiff
Fixed informix behaviour for select without into.
authorMichael Meskes <meskes@postgresql.org>
Fri, 4 Jul 2003 11:30:48 +0000 (11:30 +0000)
committerMichael Meskes <meskes@postgresql.org>
Fri, 4 Jul 2003 11:30:48 +0000 (11:30 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/test/test_informix.pgc

index ad428b5da01bde298f3d79d2296d1f4a4f6ce6a2..fff7d1301ad5266f0e993c11694514c968d8e521 100644 (file)
@@ -1541,6 +1541,11 @@ Tue Jul  1 11:57:56 CEST 2003
        - Added a new data type "decimal" which is mostly the same as our
          "numeric" but uses a fixed length array to store the digits. This is
          for compatibility with Informix and maybe others.
+         
+Wed Jul  2 09:45:59 CEST 2003
+
+       - Fixed initialization bug in compatlib.
+       - Added postgres_fe.h to all files in pgtypeslib.
        - Set ecpg version to 3.0.0
        - Set ecpg library to 4.0.0
        - Set pgtypes library to 1.0.0
index bc945a442c122c871ceeae5ed2dbd1e4120fde4c..87d528533de43fa66b62ca6b1aafa61dcfb7da03 100644 (file)
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.14 2003/07/01 12:40:51 meskes Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.15 2003/07/04 11:30:48 meskes Exp $ */
 
 /*
  * The aim is to get a simpler inteface to the database routines.
@@ -1173,15 +1173,16 @@ ECPGexecute(struct statement * stmt)
                                else
                                        for (act_field = 0; act_field < nfields && status; act_field++)
                                        {
-                                               if (var == NULL)
+                                               if (var != NULL)
+                                               {
+                                                       status = ECPGstore_result(results, act_field, stmt, var);
+                                                       var = var->next;
+                                               }
+                                               else if (!INFORMIX_MODE(stmt->compat))
                                                {
                                                        ECPGraise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, NULL);
                                                        return (false);
                                                }
-
-                                               status = ECPGstore_result(results, act_field, stmt, var);
-
-                                               var = var->next;
                                        }
 
                                if (status && var != NULL)
index fa0de6eb6efc23dbbec1dd26b3699b821f810601..71d804a3c4d9c8f90c0755fb11e22280d0231b43 100644 (file)
@@ -47,6 +47,12 @@ int main()
        $delete from test where i=:n;
        printf("delete: %ld\n", sqlca.sqlcode);
 
+       $select 1 from test where i=14;
+       printf("Exists: %ld\n", sqlca.sqlcode);
+
+       $select 1 from test where i=147;
+       printf("Does not exist: %ld\n", sqlca.sqlcode);
+       
        $commit;
        $drop table test;
        $commit;