Re: [HACKERS] Bug

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: phd2(at)earthling(dot)net, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Bug
Date: 1999-09-17 15:43:17
Message-ID: 199909171543.LAA19225@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Oleg Broytmann <phd(at)sun(dot)med(dot)ru> writes:
> > ran=> create table test1 (n int default nextval('seq_test'), t text);
> > ran=> insert into test1 ("t") select distinct src from test_source;
> > [ doesn't work right ]
>
> My, that's an interesting case. I think that fits right in with my
> remark yesterday that the SELECT inside an INSERT ... SELECT needs
> to have a targetlist that's separate from the INSERT's list. As it
> stands, we form a targetlist representing the set of values that need
> to be inserted into the target table --- and then the DISTINCT pass
> runs on those tuples :-(, because there is nothing else for it to
> run on.
>
> In short, this is not a trivial thing to fix. We need multilevel
> query trees...

Added to TODO:

* Allow multi-level query trees for INSERT INTO ... SELECT

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-09-17 15:47:59 Re: [HACKERS] Re: attdisbursiont
Previous Message Tom Lane 1999-09-17 14:58:49 Re: [HACKERS] Re: attdisbursion