From: Thomas Berezansky Date: Tue, 11 Sep 2012 13:21:36 +0000 (-0400) Subject: QueryParser Driver: Use proper table alias X-Git-Tag: sprint4-merge-nov22~3453 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f5a4c11716fbcf5a248dfa69533fbc660e646e0c;p=working%2FEvergreen.git QueryParser Driver: Use proper table alias When all atoms are dummy atoms we need the correct table alias. Signed-off-by: Thomas Berezansky Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index cc2304df8b..de68579700 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -876,7 +876,7 @@ sub flatten { $with .= "${talias}_xq AS (SELECT ". $node->tsquery ." AS tsq )"; $from .= "\n${spc}${spc}${spc}${spc}${spc}${spc}JOIN ${talias}_xq ON (fe.index_vector @@ ${talias}_xq.tsq)"; } else { - $from .= "\n${spc}${spc}${spc}${spc}${spc}${spc}, (SELECT NULL::tsquery AS tsq ) AS x"; + $from .= "\n${spc}${spc}${spc}${spc}${spc}${spc}, (SELECT NULL::tsquery AS tsq ) AS ${talias}_xq"; } my @bump_fields;