Skip to content

Commit

Permalink
Issue #84: Don't push down boolean constants. They are not supported …
Browse files Browse the repository at this point in the history
…by SQL Server or Sybase.
  • Loading branch information
GeoffMontee committed Aug 14, 2016
1 parent ccbf117 commit ef2afe1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/deparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,28 @@ foreign_expr_walker(Node *node,
case T_Const:
{
Const *c = (Const *) node;
Oid typoutput;
bool typIsVarlena;

ereport(DEBUG3,
(errmsg("tds_fdw: it is a constant expression")
));

getTypeOutputInfo(c->consttype,
&typoutput, &typIsVarlena);

switch (c->consttype)
{
case BOOLOID:
ereport(DEBUG3,
(errmsg("tds_fdw: the constant is a boolean value, which is unsupported")
));
return false;
default:
ereport(DEBUG3,
(errmsg("tds_fdw: the constant seems to be a supported type")
));
}

/*
* If the constant has nondefault collation, either it's of a
Expand Down

0 comments on commit ef2afe1

Please sign in to comment.