Re: [HACKERS] Keep ECPG comment for log_min_duration_statement

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: [HACKERS] Keep ECPG comment for log_min_duration_statement
Дата
Msg-id 1487935529.2061.73.camel@postgresql.org
обсуждение исходный текст
Ответ на Re: [HACKERS] Keep ECPG comment for log_min_duration_statement  ("Okano, Naoki" <okano.naoki@jp.fujitsu.com>)
Ответы Re: [HACKERS] Keep ECPG comment for log_min_duration_statement  ("Okano, Naoki" <okano.naoki@jp.fujitsu.com>)
Список pgsql-hackers
> As I said in the first e-mail, there are some restrictions of comment
> position in my implementation. I am concerned that an error will
> occur in .pgc files users made in old version.
> So, this feature should be a new option.

I see, this makes sense.

> When the pre-compiler(ECPG) converts C with embedded SQL to normal C
> code, gram.y is used for syntactic analysis. I need to change gram.y
> for comments in SQL statement. 
> But I do not come up with better idea that gram.y is not affected.
> If you are interested in my implementation in detail, please check
> the [WIP]patch I attached.

I'm not sure we would want to change the backend parser for something
only used in ecpg. Actually I'm pretty sure we don't.

I can see two possible solutions. One would be to replace the parser
rules. Please see parse.pl for details. Some rules are already replaced
by ecpg specific ones. However, the more rules we replace the more
manual syncing effort we need for changes in gram.y.

The other option I can see, albeit without looking into details, is
allowing all comments and then testing it for the right syntax after
parsing. This could potentially also solve the above mentioned option
problem.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: [HACKERS] Proposal : Parallel Merge Join
Следующее
От: Kuntal Ghosh
Дата:
Сообщение: Re: [HACKERS] increasing the default WAL segment size