BUG #10060: Distinct SQL results

From: omar(dot)pessoa(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #10060: Distinct SQL results
Date: 2014-04-17 19:15:32
Message-ID: 20140417191532.17171.93236@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 10060
Logged by: Omar Pessoa
Email address: omar(dot)pessoa(at)gmail(dot)com
PostgreSQL version: 9.3.4
Operating system: Windows 7.
Description:

-- work

select t.unnest, r.id from (select
unnest((string_to_array(seq_road,',')::int[])) from rota_data d where d.num
= 1) as t, ruas r where r.id = t.unnest

-- dont work
select t.unnest, r.id, r.logradouro from (select
unnest((string_to_array(seq_road,',')::int[])) from rota_data d where d.num
= 1) as t, ruas r where r.id = t.unnest

-- work
select t.unnest, r.id, r.logradouro from (select
unnest(string_to_array(string_agg(seq_road,','),',')::int[]) from rota_data
d where d.num = 1) as t, ruas r, ruas w where r.id = w.id AND w.id =
t.unnest

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G Johnston 2014-04-17 23:28:51 Re: BUG #10060: Distinct SQL results
Previous Message fburgess 2014-04-17 16:19:17 Re: Having trouble configuring a Master with multiple standby Servers in PostgreSQL 9.3.3