Re: INSERT ... ON CONFLICT documentation clean-up patch
От | Peter Geoghegan |
---|---|
Тема | Re: INSERT ... ON CONFLICT documentation clean-up patch |
Дата | |
Msg-id | CAM3SWZSdCHrzzrwspso_CC2zUprr2-y5t-a2vUX+W=Yf5uHUeg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: INSERT ... ON CONFLICT documentation clean-up patch (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: INSERT ... ON CONFLICT documentation clean-up patch
|
Список | pgsql-hackers |
As discussed on IM, I think we should make the insert.sgml documentation even close to select.sgml than before, in that parameters ought to be discussed in different sections, and not in one large block. insert.sgml is too complicated for that approach now. Attached revision (rebase) of your modified version of my patch (the modification you provided privately) has the following notable changes: * New section for "Inserting" parameters. Now, "On Conflict Clause" section is a subsection of the Standard Parameters' parent section (so they're siblings). This seemed like the best division of parameters here. It didn't seem to make much sense to imagine that we ought to have multiple very specific categories in the style of select.sgml (meaning that the old insert text would have to be integrated with this new section discussing "Insertion" parameters, I suppose) -- we didn't go far enough in this direction before, now but that would be too far IMV. * The term "unique index inference clause" has been removed. Inference is now something that conflict_target sometimes (or usually) does. There is no clause that does inference that isn't exactly conflict_target. * As in my original, NOT DEFERRABLE constraints are the only type supported -- we should not mention "deferred" constraints at all. You changed that back. I changed it back again here. * "ON CONFLICT Clause" section now mentions ON CONFLICT DO UPDATE/NOTHING far sooner. I think this is far clearer. * output_expression currently said to not project updated columns from RETURNING, which is just wrong. This is fixed. * General further copy-editing. Establishing the ON CONFLICT context significantly improved the flow of discussing the new-to-9.5 parameters. I did more than I'd planned to here, but I think it's shorter overall, and is certainly more consistent. I'd also say that it reads better. Thoughts? -- Peter Geoghegan
Вложения
В списке pgsql-hackers по дате отправления: