Re: [HACKERS] Patch to implement pg_current_logfile() function
От | Karl O. Pinc |
---|---|
Тема | Re: [HACKERS] Patch to implement pg_current_logfile() function |
Дата | |
Msg-id | 20170118101120.6bdb07a0@slate.meme.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Patch to implement pg_current_logfile() function (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: [HACKERS] Patch to implement pg_current_logfile() function
|
Список | pgsql-hackers |
On Wed, 18 Jan 2017 13:26:46 +0900 Michael Paquier <michael.paquier@gmail.com> wrote: > On Wed, Jan 18, 2017 at 11:36 AM, Karl O. Pinc <kop@meme.com> wrote: > > On Wed, 18 Jan 2017 11:08:25 +0900 > > Michael Paquier <michael.paquier@gmail.com> wrote: > > > >> Our ideas rather map here, ERRCODE_INTERNAL_ERROR would be adapted > >> for this situation. Do any of you want to give it a shot or should > >> I? > What do you think about that? > + log_filepath = strchr(lbuffer, ' '); > + if (log_filepath == NULL) > + { > + /* > + * Corrupted data found, return NULL to the caller and > still > + * inform him on the situation. > + */ > + ereport(WARNING, > + (ERRCODE_INTERNAL_ERROR, > + errmsg("corrupted data found in \"%s\"", > + LOG_METAINFO_DATAFILE))); > + break; > + } You must write errcode(ERRCODE_INTERNAL_ERROR) instead of just ERRCODE_INTERNAL_ERROR If you don't you get back 01000 for the error code. Test by using psql with '\set VERBOSITY verbose'. v26 patch attached which fixes this. Regards, Karl <kop@meme.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: