Re: [BUGS] postgresql-6.1.1: losing "distinct" in "create view XXX as select distinct ...".

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: ic@cms.spb.su (Ivan Crivoruchko)
Cc: hackers@postgreSQL.org (PostgreSQL-development)
Date: 1998-01-11T21:34:44Z
Lists: pgsql-hackers
Distinct is now disabled for Views in 6.3.  It reports an error and fails.

> Please describe a way to repeat the problem.   Please try to provide a
> concise reproducible example, if at all possible: 
> ----------------------------------------------------------------------
> 
> [ic@cms PGconi]$ createdb bugexample
> [ic@cms PGconi]$ psql bugexample
> Welcome to the POSTGRESQL interactive sql monitor:
>   Please read the file COPYRIGHT for copyright terms of POSTGRESQL
> 
>    type \? for help on slash commands
>    type \q to quit
>    type \g or terminate with semicolon to execute query
>  You are currently connected to the database: bugexample
> 
> bugexample=> create table foo ( x int );
> CREATE
> bugexample=> insert into foo values (1);
> INSERT 3035854
> bugexample=> insert into foo values (1);
> INSERT 3035855
> bugexample=> insert into foo values (2);
> INSERT 3035856
> bugexample=> create view bar as select distinct * from foo;
> CREATE
> bugexample=> select * from bar;
> x
> -
> 1
> 1
> 2
> (3 rows)
> 
> bugexample=> 
> 
> 
> If you know how this problem might be fixed, list the solution below:
> ---------------------------------------------------------------------
> 
> ?
> 
> 
> 
> ic
> 
> P.S. Sorry for my bad english grammatic ... :-(
> 
> 


-- 
Bruce Momjian
maillist@candle.pha.pa.us