Differences From
Artifact [d78cd2aaf3]:
451 451 char* connstr = getenv("wgsync_conn");
452 452 if(connstr == null) _fatal("no connection string supplied");
453 453 PGconn* db = PQconnectdb(connstr);
454 454 if(PQstatus(db) != CONNECTION_OK)
455 455 _fatal(PQerrorMessage(db));
456 456
457 457 PGresult* q_get_hosts = PQprepare(db, "get_hosts",
458 - "select h.ref, array_remove(
458 + "select h.ref, array_remove("
459 459 /* "select h.ref, array_remove(array_agg(wgv4::inet) ||" */
460 460 "array_agg(wgv6::inet), null)"
461 461 "from ns, hostref h "
462 462 "where ns.host = h.host and kind = 'pubkey' "
463 463 " group by h.host, h.ref;", 0, null);
464 464 /*"select ns.wgv4::inet, ns.wgv6::inet, h.ref from ns "
465 465 "right join hostref h "