From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fix for tablename in targetlist |
Date: | 2001-05-20 02:50:17 |
Message-ID: | 200105200250.f4K2oHs03555@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > OK, here is another patch that does this:
> >
> > That seems considerably uglier than your first patch. In particular,
> > why aren't you looking for isRel being set in the Ident node? It
> > looks to me like you may have changed the behavior in the case where
> > the Ident could be either a table or column name.
>
> OK, here is a new patch. I thought I had to go through
> transformTargetEntry() -> transformExpr() -> transformIdent() to get
> Ident.isRel set. Seems it is set earlier too, so the new code is
> shorter. I am still researching the purpose of Ident.isRel. If someone
> knows, please chime in. I know it says the Ident is a relation, but why
> have a field when you can look it up in the rangetable?
This patch was no good. It worked only because I had created test as:
CREATE TABLE test ( test int);
to test Peter's test of matching column/table names. In fact, I was
right that you have to call transformTargetEntry() -> transformExpr() ->
transformIdent() to get isRel set, and I have to do the longer fix.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-05-20 04:28:16 | Re: Re: External search engine, advice |
Previous Message | mlw | 2001-05-20 02:35:54 | Re: External search engine, advice |