diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-08-27 11:19:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-08-27 11:19:27 +0000 |
commit | 7222ddd36eb376fc2b1465a700d8ae496af006b7 (patch) | |
tree | a311aaa86a800121d64fda423b40549aa7ed13b2 /src/datacache/plugin_datacache_postgres.c | |
parent | ac955dcaf0eb30869f47d6aaf3464ceaebd5fa26 (diff) |
fix
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r-- | src/datacache/plugin_datacache_postgres.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index 5959d54a6d..53118e6bfb 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c @@ -154,7 +154,7 @@ init_connection (struct Plugin *plugin) return GNUNET_SYSERR; } ret = PQexec (plugin->dbh, - "CREATE TEMPORARY `TABLE gn090dc (" + "CREATE TEMPORARY TABLE gn090dc (" " type INTEGER NOT NULL DEFAULT 0," " discard_time BIGINT NOT NULL DEFAULT 0," " key BYTEA NOT NULL DEFAULT ''," @@ -177,7 +177,7 @@ init_connection (struct Plugin *plugin) if ((GNUNET_OK != pq_exec (plugin, "CREATE INDEX idx_key ON gn090dc (key)", __LINE__)) || (GNUNET_OK != - pq_exec (plugin, "CREATE INDEX idx_dt ON gn090 (discard_time)", + pq_exec (plugin, "CREATE INDEX idx_dt ON gn090dc (discard_time)", __LINE__)) ) { PQclear (ret); @@ -217,20 +217,20 @@ init_connection (struct Plugin *plugin) pq_prepare (plugin, "getkt", "SELECT discard_time,type,value FROM gn090dc " - "WHERE hash=$1 type=$2 ", + "WHERE key=$1 AND type=$2 ", 2, __LINE__)) || (GNUNET_OK != pq_prepare (plugin, "getk", "SELECT discard_time,type,value FROM gn090dc " - "WHERE hash=$1", + "WHERE key=$1", 1, __LINE__)) || (GNUNET_OK != pq_prepare (plugin, "getm", - "SELECT length(value),oid FROM gn090dc" + "SELECT length(value),oid FROM gn090dc " "ORDER BY discard_time ASC LIMIT 1", 0, __LINE__)) || |