Made PQsetdb() and PQfnumber() case-insensitive.
Removed attempt to set table ownership via pg_dumpall.
#ifndef PORT_PROTOS_H
#define PORT_PROTOS_H
+/*
+ * Externals in libc that need prototypes (or at least declarations)
+ */
+
+extern char *ecvt(double, int, int*, int*);
+extern char *fcvt(double, int, int*, int*);
+
+
#include "fmgr.h" /* for func_ptr */
#include "utils/dynamic_loader.h"
else
BS='\\' # System V
fi
-psql -l -A -q -t|cut -d"|" -f1-2 | tr '|' ' ' | grep -v '^template1 ' | \
-while read DATABASE USER
+psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \
+while read DATABASE USERID USER
do
echo "${BS}connect template1"
echo "create database $DATABASE;"
- echo "update pg_database set datdba = $USER where datname = '$DATABASE';"
echo "${BS}connect $DATABASE"
pg_dump "$@" $DATABASE
done
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.34 1997/05/13 01:46:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.35 1997/05/20 03:38:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* An error message from some service we call. */
bool error;
/* We encountered an error that prevents successful completion */
-
+ int i;
+
conn = (PGconn*)malloc(sizeof(PGconn));
if (conn == NULL)
((tmp = getenv("PGDATABASE")))) {
conn->dbName = strdup(tmp);
} else conn->dbName = strdup(conn->pguser);
+ for(i = 0; conn->dbName[i]; i++)
+ if (isupper(conn->dbName[i]))
+ conn->dbName[i] = tolower(conn->dbName[i]);
} else conn->dbName = NULL;
if (error) conn->status = CONNECTION_BAD;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.28 1997/01/24 17:47:33 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.29 1997/05/20 03:39:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return -1;
for (i=0;i<res->numAttributes;i++) {
- if ( strcmp(field_name, res->attDescs[i].name) == 0 )
+ if ( strcasecmp(field_name, res->attDescs[i].name) == 0 )
return i;
}
return -1;
return 1;
else
return 0;
- }
+}