diff options
author | Michael Meskes <meskes@postgresql.org> | 2006-08-29 12:24:52 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2006-08-29 12:24:52 +0000 |
commit | b1710339ba2e318cf6af1a50d4256e9fa98e6c8a (patch) | |
tree | b6a8e0e1cd54f153d737beb368a528bfb389ad42 /src/interfaces/ecpg/ecpglib/connect.c | |
parent | ba9f9bf1b103d72196d76646c6fcc71abbdd51f5 (diff) | |
download | postgresql-b1710339ba2e318cf6af1a50d4256e9fa98e6c8a.tar.gz postgresql-b1710339ba2e318cf6af1a50d4256e9fa98e6c8a.zip |
Fixed parser and library to allow empty database names.
Streamlined connection name parsing.
Added Joachim's patch to shorten paths before diffing.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/connect.c')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/connect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c index 4ce68c23e16..b07a8bbeb65 100644 --- a/src/interfaces/ecpg/ecpglib/connect.c +++ b/src/interfaces/ecpg/ecpglib/connect.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.34 2006/08/27 16:15:41 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.35 2006/08/29 12:24:51 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -427,7 +427,8 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p host = ECPGstrdup(tmp + 1, lineno); *tmp = '\0'; } - realname = ECPGstrdup(dbname, lineno); + + realname = (strlen(dbname) > 0) ? ECPGstrdup(dbname, lineno) : NULL; } } else |