From f5a4c11716fbcf5a248dfa69533fbc660e646e0c Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Tue, 11 Sep 2012 09:21:36 -0400 Subject: [PATCH] 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 --- .../perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0