Re: refactoring comment.c
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: KaiGai Kohei <kaigai@kaigai.gr.jp>, pgsql-hackers@postgresql.org
Date: 2010-08-17T02:40:39Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > On Mon, Aug 16, 2010 at 3:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> I think the problem is you're trying to put this into backend/parser >> which is not really the right place for it. > If this isn't parse analysis, then you and I have very different ideas > of what parse analysis is. Maybe so, but the parser is expected to put out a representation that will still be valid when the command is executed some time later. That is exactly why utility statements have the barely-more-than-source parsetree representation they do: because we do not hold locks on the objects from parsing to execution, we could not expect an OID-level representation to remain good. This is a lot different from what we do with DML statements, but there are good reasons for it. I repeat my observation that this code doesn't belong in /parser. The code you're replacing was not in /parser, and that was because it didn't belong there, not because somebody didn't understand the system structure. regards, tom lane