Bug #910: query with inherits

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #910: query with inherits
Date: 2003-03-15 19:51:28
Message-ID: 20030315195128.5582A475F0D@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Igor (programer_c(at)land(dot)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

Browse pgsql-bugs by date

  From Date Subject
Next Message Glen Mazza 2003-03-15 22:08:10 PostgreSQL Home page: User Survey returning errors
Previous Message Bruce Momjian 2003-03-15 17:13:10 Re: Important typo fix for hba.c in 7.4