Re: Deprecating RULES
От | Andrew Dunstan |
---|---|
Тема | Re: Deprecating RULES |
Дата | |
Msg-id | 5080083E.2010505@dunslane.net обсуждение исходный текст |
Ответ на | Re: Deprecating RULES (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Deprecating RULES
|
Список | pgsql-hackers |
On 10/17/2012 07:25 PM, Tom Lane wrote: > > I'm fairly annoyed by the entire tenor of this conversation, because > the people who are hollering the loudest seem to be people who have > never actually touched any of the rules code, but nonetheless seem > prepared to tell those of us who have what to spend our time on. +1 I too have been quite annoyed. > > Now having said that, I would definitely like to see rules in their > current form go away eventually. But not without a substitute. > Triggers are not a complete replacement, and no amount of wishful > thinking makes them so. > > Perhaps it would be more profitable to try to identify the pain points > that make people so eager to get rid of rules, and then see if we could > alleviate them. One big problem I know about offhand is the > multiple-evaluation risk, which seems at least in principle fixable. > What others are there? > > Yeah. That's by far the best approach. It has the merit of being positive rather than just taking something away that people do use, even if it's only a relatively small number of users. The biggest pain people have mentioned is that they don't work with COPY. I am in fact about to start working on a project which will probably alleviate that pain point. I'm not going to say much more, and I would not have said anything right now except that there is this sudden rush to deprecate rules, or announce a future removal of the feature. However, I hope to have a proposal to put to the community by about the end of November. On that point, it's also worth noting that FDWs provide a nice workaround, instead of doing a straight COPY TO mytable FROM myfile you set up the source as a foreign table using file_fdw or my file_text_array_fdw, and then do INSERT INTO mytable SELECT ... FROM my_foreign_table; Maybe this too would be worth mentioning in the docs, maybe in the rules section with an xref from the copy section. So, please, hold off for little bit. I don't mind putting warnings in the docs, but I'd really rather we waited on any announcement of a future possible deprecation, or log warnings that using rules will cause zombies to eat your brainz. cheers andrew
В списке pgsql-hackers по дате отправления: