Bug #910: query with inherits - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #910: query with inherits
Date
Msg-id 20030315195128.5582A475F0D@postgresql.org
Whole thread Raw
List pgsql-bugs
Igor (programer_c@land.ru) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
query with inherits

Long Description
In the next situation:
       CREATE TABLE main (f1 int4 NOT NULL, PRIMARY KEY(f1));
       CREATE TABLE derived (f2 int4) INHERIT (main);
       CREATE TABLE other (f3 int4, f1 int1 NOT NULL);
expression
       explain analyze SELECT * FROM main WHERE f1=1;
executed by index scan main and derived,
but expression
       explain analyze SELECT * FROM main m, other o WHERE o.f3=1 AND o.f1=m.f1;
executed by seq scan main and derived. Why?

                                           Best regard with Russia!

Sample Code


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Important typo fix for hba.c in 7.4
Next
From: Glen Mazza
Date:
Subject: PostgreSQL Home page: User Survey returning errors