Re: [HACKERS] Some progress on INSERT/SELECT/GROUP BY bugs

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: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Some progress on INSERT/SELECT/GROUP BY bugs
Date: 1999-05-14 01:22:22
Message-ID: 199905140122.VAA18495@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> (MakeTargetEntryIdent is broken anyway because it tries to associate
> a destination column with every TLE, even the resjunk ones. The reason
> we see the quoted error message in this situation is that after
> findTargetlistEntry fails to detect that totshippinghandling is already
> a TLE, it calls MakeTargetEntryIdent to make a junk TLE for
> totshippinghandling, and then MakeTargetEntryIdent tries to find a
> target column to go with the junk TLE. So the revised code should only
> assign dest column names to non-junk TLEs.)
>
> I'm not really familiar enough with the parser to want to tackle this
> size of change by myself --- Thomas, do you want to do it? I think it's
> largely a matter of moving code around, but I'm not sure where is the
> right place for it...

Yes, I clearly remember the INSERT assigning target names to columns in
the select to match up the entries. I still am unclear which of these
are valid SQL:

select a as b from test order by a

select a as b from test order by b

Can we just defer the renaming until after we do group-by?

--
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 Tom Lane 1999-05-14 01:32:11 Re: [HACKERS] Progress on char(n) default-value problem
Previous Message Bruce Momjian 1999-05-14 01:09:52 Re: [HACKERS] Progress on char(n) default-value problem