Re: BUG #12137: ORDER BY with expresion changes the output if added

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dima(at)koulikoff(dot)ru
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12137: ORDER BY with expresion changes the output if added
Date: 2014-12-04 16:22:21
Message-ID: 27034.1417710141@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

dima(at)koulikoff(dot)ru writes:
> The request ...
> returns Russian names in :name field from the geoname_names table
> But if I add a line
> ORDER BY CASE WHEN geoname_names.name IS NOT NULL THEN geoname_names.name
> ELSE geonames.name END
> at the end of the request all the values for name are taken from the
> geonames table.

I can't reproduce any such misbehavior with the given information
and some made-up data. Can you provide a self-contained test case?
Or at least EXPLAIN (ANALYZE, VERBOSE) output for both queries?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-12-05 02:29:27 Re: BUG #12146: Crash when using UNION ALL
Previous Message me 2014-12-04 16:03:38 BUG #12146: Crash when using UNION ALL