IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 27, 2008, 5:57:07 PM (18 years ago)
Author:
eugene
Message:

add label; fix definebyquery -- do not join against tess_id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/stacktool.c

    r19249 r19256  
    129129    PXOPT_COPY_F32(config->args,  where, "-select_good_frac_min",      "warpSkyfile.good_frac", ">=");
    130130    PXOPT_COPY_STR(config->args,  where, "-select_skycell_id",         "warpSkyfile.skycell_id", "==");
     131    PXOPT_COPY_STR(config->args,  where, "-select_label",              "warpRun.label", "==");
    131132
    132133    // these are used to build the HAVING restriction
     
    242243    if (psListLength(where->list)) {
    243244        psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    244         psStringAppend(&select, " AND %s", whereClause);
     245        psStringAppend(&insert, " AND %s", whereClause);
    245246        psFree(whereClause);
    246247    }
     
    350351        // this insert needs to use exactly the same restrictions (race condition is probably not critical)
    351352        // the insert below seems to only restrict matches to the skycell, tess, and filter
    352         if ((randomLimit > 0 && !p_psDBRunQuery(config->dbh, thisInsert, skycell_id, tess_id, filter,
    353                                                 randomLimit)) ||
    354             (randomLimit <= 0 && !p_psDBRunQuery(config->dbh, thisInsert, skycell_id, tess_id, filter))) {
     353        if ((randomLimit > 0 && !p_psDBRunQuery(config->dbh, thisInsert, skycell_id, filter, randomLimit)) ||
     354            (randomLimit <= 0 && !p_psDBRunQuery(config->dbh, thisInsert, skycell_id, filter))) {
    355355            psError(PS_ERR_UNKNOWN, false, "database error");
    356356            psFree(thisInsert);
Note: See TracChangeset for help on using the changeset viewer.