I have a multicorn module that starts with this code :
def execute(self, quals, columns):
path = None
for qual in quals:
if qual.field_name == "path":
path = qual.value
if path == None:
log_to_postgres("must have non null path in where clause", ERROR)
It must have a "path" qual in a where clause, or join condition
This query works :
SELECT l.*
from altorf_logs_ms l
WHERE
l.path = '/netmount/130529_17_OT3_YY1_1_HEK293/logs'
;
However, this one does not, the code above falls in the "if path == None" case,
i.e. the "path" qual gets lost when it is not a constant string
with q0 as (SELECT '/netmount/130529_17_OT3_YY1_1_HEK293/logs'::text p)
SELECT l.*
from altorf_logs_ms l
join q0 on l.path = q0.p
Logically the two queries are the same, but something doesn't work in the second
I have a multicorn module that starts with this code :
It must have a "path" qual in a where clause, or join condition
This query works :
However, this one does not, the code above falls in the "if path == None" case, i.e. the "path" qual gets lost when it is not a constant string
Logically the two queries are the same, but something doesn't work in the second