From: Thomas Berezansky Date: Tue, 11 Sep 2012 13:21:36 +0000 (-0400) Subject: QueryParser Driver: Use proper table alias X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c69810674b6554a52b59e8d0e7037ffe29b3aa50;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 --- 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;