From: "Dr. Michael Meskes"
authorMarc G. Fournier
Tue, 7 Jul 1998 17:59:32 +0000 (17:59 +0000)
committerMarc G. Fournier
Tue, 7 Jul 1998 17:59:32 +0000 (17:59 +0000)
+ Thu Jul  2 20:30:14 CEST 1998
+
+       - Changed new style db name to allow connection types "tcp" and
+         "unix" only
+
+ Tue Jul  7 15:14:14 CEST 1998
+
+       - Fixed some bugs in preproc.y
+       - Set version to 2.3.4

src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/lib/ecpglib.c
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/test/test2.pgc

index bef6e29787bf2715ed4c9042d53e0d212815757f..8131d499f67040b3d75f6d8fd650af983102e266 100644 (file)
@@ -248,3 +248,13 @@ Wed Jun  3 13:38:57 CEST 1998
      CREATE RULE
    - Set library version to 2.3
    - Set version to 2.3.3
+
+Thu Jul  2 20:30:14 CEST 1998
+
+   - Changed new style db name to allow connection types "tcp" and
+     "unix" only
+
+Tue Jul  7 15:14:14 CEST 1998
+
+   - Fixed some bugs in preproc.y
+   - Set version to 2.3.4
index 8e4f8cdd25a60d7e1b2bf1342b5912e92e7af785..ecbd2354617998d5b104fbe5748bdb3ab0ca5ea5 100644 (file)
@@ -895,7 +895,9 @@ ECPGdisconnect(int lineno, const char *connection_name)
            return false;
        }
        else
+       {
            ECPGfinish(con);
+       }
    }
    
    return true;
index e90d0731c467b463f471c0e28285dc90772a7ff6..da392d205462feb4e20c73d82aa5e3b0150053ad 100644 (file)
@@ -3,7 +3,7 @@ include $(SRCDIR)/Makefile.global
 
 MAJOR_VERSION=2
 MINOR_VERSION=3
-PATCHLEVEL=3
+PATCHLEVEL=4
 
 CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
    -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
index 9a7b348f61922af3b482583de55978b0087935da..6f320b06d500f6157573003d458fc86682192f72 100644 (file)
@@ -4032,12 +4032,24 @@ connection_target: database_name opt_server opt_port
        }
         |  db_prefix server opt_port '/' database_name opt_options
                 {
-         /* new style: esql:postgresql://server[:port][/dbname] */
+         /* new style: :postgresql://server[:port][/dbname] */
                   if (strncmp($2, "://", 3) != 0)
          {
            sprintf(errortext, "parse error at or near '%s'", $2);
            yyerror(errortext);
          }
+
+         if (strncmp($1, "unix", 4) == 0 && strncmp($2, "localhost", 9) != 0)
+         {
+           sprintf(errortext, "unix domain sockets only work on 'localhost'");
+                    yyerror(errortext);
+         }
+
+         if (strncmp($1, "unix", 4) != 0 && strncmp($1, "tcp", 3) != 0)
+         {
+           sprintf(errortext, "only protocols 'tcp' and 'unix' are supported");
+                    yyerror(errortext);
+         }
    
          $$ = make4_str(make5_str(make1_str("\""), $1, $2, $3, make1_str("/")), $5, $6, make1_str("\""));
        }
@@ -4061,7 +4073,7 @@ db_prefix: ident cvariable
            yyerror(errortext); 
          }
 
-         if (strcmp($1, "esql") != 0 && strcmp($1, "ecpg") != 0 && strcmp($1, "sql") != 0 && strcmp($1, "isql") != 0 && strcmp($1, "proc") != 0)
+         if (strcmp($1, "tcp") != 0 && strcmp($1, "unix") != 0)
          {
            sprintf(errortext, "Illegal connection type %s", $1);
            yyerror(errortext);
index 7f4041de3b504759f5518d7cc61c21e173cb55a8..dd395c80eb94aeee60f610e133297bd271f6d7b6 100644 (file)
@@ -291,7 +291,9 @@ ECPGdump_a_struct(FILE *o, const char *name, const char * ind_name, long arrsiz,
        offset = obuf;
    }
    else
+   {
        offset = offsetarg;
+   }
 
    sprintf(pbuf, "%s%s.", prefix ? prefix : "", name);
    prefix = pbuf;
@@ -347,7 +349,9 @@ ECPGfree_type(struct ECPGtype * typ)
            free(typ->u.members);
        }
        else
+       {
            abort();
+       }
    }
    free(typ);
 }
index 324a63b941b18ab6f4e74f35630e58795dfb13c0..bfad1a9493b7f33bf8d4be0b2421237280dca94a 100644 (file)
@@ -26,7 +26,7 @@ exec sql end declare section;
                 ECPGdebug(1, dbgs);
 
    strcpy(msg, "connect");
-   exec sql connect to mm;
+   exec sql connect to tcp:postgresql://localhost:5432/mm;
 
    strcpy(msg, "create");
    exec sql create table meskes(name char(8), born integer, age smallint, married char(8));