Re: Fix for tablename in targetlist
От | Bruce Momjian |
---|---|
Тема | Re: Fix for tablename in targetlist |
Дата | |
Msg-id | 200105200250.f4K2oHs03555@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Fix for tablename in targetlist (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Fix for tablename in targetlist
|
Список | pgsql-hackers |
> > Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: