Re: PREPARE code notes
| От | Tom Lane |
|---|---|
| Тема | Re: PREPARE code notes |
| Дата | |
| Msg-id | 11102.1031586668@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | PREPARE code notes (Karel Zak <zakkr@zf.jcu.cz>) |
| Ответы |
Re: PREPARE code notes
|
| Список | pgsql-hackers |
Karel Zak <zakkr@zf.jcu.cz> writes:
> 1/ ExecuteQuery() (line 110). Why is needful use copyObject()? The
> PostgreSQL executor modify query planns?
Yes, and yes. Unfortunately.
> 2/ Lines 236 -- 245. Why do you "check for pre-existing entry of
> same name" if you create hash table? I think better is use "else"
> for this block of code and check it only if hash table already
> exist.
The code reads more cleanly as-is; changing it as you suggest would
create an unnecessary interdependency between two logically distinct
concerns.
> 3/ Last is cosmetic: see line 404, what happen if memory context
> is not valid? :-) (maybe use some elog() call)
Or just get rid of the MemoryContextIsValid test --- it shouldn't
ever not be valid. Not very important though.
regards, tom lane
В списке pgsql-hackers по дате отправления: