Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions redis_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1621,22 +1621,20 @@ redisGetQual(Node *node, TupleDesc tupdesc, char **key, char **value, bool *push

if (IsA(right, Const))
{
StringInfoData buf;

initStringInfo(&buf);
if (((Const *) right)->consttype == TEXTOID) {
/* And get the column and value... */
*key = NameStr(TupleDescAttr(tupdesc, varattno - 1)->attname);
*value = TextDatumGetCString(((Const *) right)->constvalue);

/* And get the column and value... */
*key = NameStr(TupleDescAttr(tupdesc, varattno - 1)->attname);
*value = TextDatumGetCString(((Const *) right)->constvalue);

/*
* We can push down this qual if: - The operatory is TEXTEQ - The
* qual is on the key column
*/
if (op->opfuncid == PROCID_TEXTEQ && strcmp(*key, "key") == 0)
*pushdown = true;
/*
* We can push down this qual if: - The operatory is TEXTEQ - The
* qual is on the key column
*/
if (op->opfuncid == PROCID_TEXTEQ && strcmp(*key, "key") == 0)
*pushdown = true;

return;
return;
}
}
}

Expand Down