Lists: | pgsql-sql |
---|
From: | Nathan Grange <nathang(at)actarg(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | 9.0rc1 - query of view produces unexpected results |
Date: | 2010-09-12 01:31:04 |
Message-ID: | 4C8C2D58.5090308@actarg.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Hello list,
I don't know if it's me, or maybe even the way I designed these
dependencies, but I'm getting unexpected results when i query a specific
view.
I can only reproduce the unexpected results with a very specific set of
tables, views, and relationships.
The bad results are only manifest in 9.0 (beta and rc1). Version 8.4.4
produces the expected results.
To sum up the issue ...
1. View register_orders_view contains only 1 row of data ...
/ttype | ropnum | shop_name
-------+--------+-----------
or | 30129 | District1/
2. The query ...
/
select * from register_orders_view where ttype='z'/
... should return no rows, however all rows are returned.
Included are a buildDemo.sql file that will create the necessary tables
and views, and a runDemo.sql to demonstrate the query from #2 above.
If this is a valid result, can someone please help me understand why?
If this is a case of "not the best" architecture a explanation would be
greatly apprecitated.
Or if this is a bug with 9.0, what actions do I take to make the
PostgreSQL team awares?
nate
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Nathan Grange <nathang(at)actarg(dot)com> |
Cc: | pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: 9.0rc1 - query of view produces unexpected results |
Date: | 2010-09-14 03:58:51 |
Message-ID: | 1284436684-sup-6808@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Excerpts from Nathan Grange's message of sáb sep 11 21:31:04 -0400 2010:
> Hello list,
>
> I don't know if it's me, or maybe even the way I designed these
> dependencies, but I'm getting unexpected results when i query a specific
> view.
> Included are a buildDemo.sql file that will create the necessary tables
> and views, and a runDemo.sql to demonstrate the query from #2 above.
You didn't attach the files, so no one can study your problem.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | Nathan Grange <nathang(at)actarg(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: 9.0rc1 - query of view produces unexpected results |
Date: | 2010-09-14 16:56:44 |
Message-ID: | 4C8FA94C.9030901@actarg.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Doh!!
Files attached this time.
On 09/11/2010 07:31 PM, Nathan Grange wrote:
> Hello list,
>
> I don't know if it's me, or maybe even the way I designed these
> dependencies, but I'm getting unexpected results when i query a
> specific view.
>
> I can only reproduce the unexpected results with a very specific set
> of tables, views, and relationships.
> The bad results are only manifest in 9.0 (beta and rc1). Version 8.4.4
> produces the expected results.
>
> To sum up the issue ...
> 1. View register_orders_view contains only 1 row of data ...
>
> /ttype | ropnum | shop_name
> -------+--------+-----------
> or | 30129 | District1/
>
> 2. The query ...
> /
> select * from register_orders_view where ttype='z'/
>
> ... should return no rows, however all rows are returned.
>
>
> Included are a buildDemo.sql file that will create the necessary
> tables and views, and a runDemo.sql to demonstrate the query from #2
> above.
>
> If this is a valid result, can someone please help me understand why?
> If this is a case of "not the best" architecture a explanation would
> be greatly apprecitated.
> Or if this is a bug with 9.0, what actions do I take to make the
> PostgreSQL team awares?
>
> nate
>
Attachment | Content-Type | Size |
---|---|---|
buildDemo.sql | text/plain | 1.6 KB |
runDemo.sql | text/plain | 315 bytes |
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Nathan Grange <nathang(at)actarg(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: 9.0rc1 - query of view produces unexpected results |
Date: | 2010-09-14 17:51:38 |
Message-ID: | 9150.1284486698@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Nathan Grange <nathang(at)actarg(dot)com> writes:
>> Or if this is a bug with 9.0, what actions do I take to make the
>> PostgreSQL team awares?
I think you already did ;-)
regards, tom lane