Re: proposal: multiple psql option -c
От | Robert Haas |
---|---|
Тема | Re: proposal: multiple psql option -c |
Дата | |
Msg-id | CA+TgmoYBvi5a7G133o2Y_6FFzg8xOVkRgmZoXRQK8pqTpp_g5Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: proposal: multiple psql option -c (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: multiple psql option -c
Re: proposal: multiple psql option -c |
Список | pgsql-hackers |
On Wed, Dec 2, 2015 at 12:33 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote: >> Yeah, I don't think that's a big issue either to be honest. The code >> is kept consistent a maximum with what is there previously. >> >> Patch is switched to ready for committer. > > perfect > > Thank you very much to all I did some edits on this patch and was all set to commit it when I ran the regression tests and discovered that this breaks 130 out of the 160 regression tests. Allow me to suggest that before submitting a patch, or marking it ready for commiter, you test that 'make check' passes. The problem seems to be the result of this code: + if (options.actions.head == NULL && pset.notty) + simple_action_list_append(&options.actions, ACT_FILE, "-"); The problem with this is that process_file() gets called with "-" where it previously got called with NULL, which changes the way error reports are printed. This would be trivial to fix were it not for the fact that SimpleActionListCell uses char val[FLEXIBLE_ARRAY_MEMBER] rather than char *val. I think you should change it so that it does the latter, and then change the above line to pass NULL for the third argument. I think that will fix it, but it's more work than I want to do on somebody else's patch, so I'm attaching my edited version here for further work. For the most part, the cleanups in this version are just cosmetic: I fixed some whitespace damage, and reverted some needless changes to the psql references page that were whitespace-only adjustments. In a few places, I tweaked documentation or comment language. I also hoisted the psqlrc handling out of an if statement where it was the same in both branches. Other than that, this version is, I believe, the same as Pavel's last version. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Вложения
В списке pgsql-hackers по дате отправления: