[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src/objectstore postgresql_access.h
From: |
James Thompson |
Subject: |
gnue/geas/src/objectstore postgresql_access.h |
Date: |
Mon, 19 Feb 2001 16:21:27 -0800 |
CVSROOT: /cvs
Module name: gnue
Changes by: James Thompson <address@hidden> 01/02/19 16:21:26
Modified files:
geas/src/objectstore: postgresql_access.h
Log message:
Returned postgresql driver to the point it will compile (no testing
done)
CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/geas/src/objectstore/postgresql_access.h.diff?r1=1.7&r2=1.8
Patches:
Index: gnue/geas/src/objectstore/postgresql_access.h
diff -u gnue/geas/src/objectstore/postgresql_access.h:1.7
gnue/geas/src/objectstore/postgresql_access.h:1.8
--- gnue/geas/src/objectstore/postgresql_access.h:1.7 Mon Feb 19 12:12:01 2001
+++ gnue/geas/src/objectstore/postgresql_access.h Mon Feb 19 16:21:26 2001
@@ -47,7 +47,7 @@
/* #include <postgres.h> */
#include "libpq-fe.h"
-#include "pg_type.h"
+/* #include "pg_type.h" */
/* database specific data structures */
struct postgresql_connection
@@ -374,7 +374,7 @@
hnd->connections)[i];
if (c->handle)
- postgresql_close(c->handle);
+ PQfinish(c->handle);
}
g_free(h->base.connections);
}
@@ -388,11 +388,11 @@
postgresql_read_database_definition(struct database_handle *hnd)
{
struct postgresql_handle *h = (struct postgresq_handle *)hnd;
- PQconn *handle;
- PQresult *res;
+ PGconn *handle;
+ PGresult *res;
char *buf;
GList *l;
- int i, j;
+ int i, j, row;
DatabaseDefinition *db = NULL;
db = create_database_definition(h->base.name);
@@ -494,7 +494,7 @@
c = (DBchange *) l->data;
g_string_append(buf, c->name);
g_string_append(buf, " ");
- switch (c->fieldtype)
+ switch (c->datatype)
{
case DT_char:
g_string_sprintfa(buf, "CHAR");
@@ -557,7 +557,7 @@
*errormsg = NULL;
/* make a list of required classnames in this database */
- required = get_classname_list(all_classes);
+ required = odl_tree_list_classes(all_classes);
/* currently only a single SQL database is allowed at one time */
/* so all classes are required */
/* TODO: remove names from list if not required in */
@@ -572,7 +572,7 @@
/* if class doesn't match a table, record the table as required */
/* if data field doesn't match a column, record the column as required */
changes = compare_classes_to_database(all_classes, required, database);
- free_classname_list(required);
+ odl_namelist_free(required);
required = NULL;
if (!changes)