From f8558c418ee4e4ff6dd5cac1b1711999f8ace20d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 3 Jun 2015 12:35:30 +0200 Subject: remarks on #3811 --- src/mintdb/plugin_mintdb_postgres.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mintdb') diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index a54c6b9ce..7982f8be7 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -280,7 +280,7 @@ postgres_create_tables (void *cls, " collectable_blindcoins (reserve_pub)"); /* Table with coins that have been (partially) spent, used to detect double-spending. - TODO: maybe rename to "spent_coins"? (#3811) */ + TODO: maybe eliminate, this might be over-normalization (#3811) */ SQLEXEC("CREATE TABLE IF NOT EXISTS known_coins " "(coin_pub BYTEA NOT NULL PRIMARY KEY" ",denom_pub BYTEA NOT NULL REFERENCES denominations (pub)" @@ -523,9 +523,10 @@ postgres_prepare (PGconn *db_conn) 4, NULL); PREPARE ("get_known_coin", "SELECT" - " denom_pub, denom_sig " - "FROM known_coins " - "WHERE coin_pub = $1", + " denom_pub" + ",denom_sig" + " FROM known_coins " + " WHERE coin_pub=$1", 1, NULL); PREPARE ("insert_known_coin", "INSERT INTO known_coins (" -- cgit v1.2.3