Re: multiple inserts

Поиск
Список
Период
Сортировка
От Liam Stewart
Тема Re: multiple inserts
Дата
Msg-id 20010907105418.A9712@redhat.com
обсуждение исходный текст
Ответ на Re: multiple inserts  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: multiple inserts  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
I'm in agreement about postponing the targetList changes; I don't like
the third attempt and knew before I started that the patch would be ugly
and would leave many things dangling.

But following up on Tom's latest suggestion, I've implemented it in the
yacc grammer rather than in the parser. I prefer this method as there is
less to change in analyze.c and it seems safer - having the parser
construct something more or less automatically and then re-using
existing functionality rather than having to build up Queries and SetOp
trees by hand (can't really use existing methods). The patch is short
actually simplifies things a bit as the targetlist field of InsertStmt
is no longer needed.

The only problem that I've encountered is that the rules regression test
is failing on the last select statement - the rule definitions are
displayed using SELECTs rather than VALUES. They are equivalent, but is
that re-writing alright? Looking at get_insert_query_def() in
ruleutils.c, it seems that this change is unavoidable if INSERT ...
VALUES are rewritten (any way) as INSERT ... SELECT, in which case
either the implementation on the patch needs to be reconsidered or the
regression test expected output needs to be modified.

Liam

--
Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: JDBC patch procedures (Re: Patch for jdbc2 ResultSet.java)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Support building in a different directory on Solaris