Re: [HACKERS] Patch to implement pg_current_logfile() function

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Patch to implement pg_current_logfile() function
Дата
Msg-id CAB7nPqQYHbrNSwf_3ge04MvaVHJNd4kmctkTztwgm0nSxefZgw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Patch to implement pg_current_logfile() function  (Gilles Darold <gilles.darold@dalibo.com>)
Список pgsql-hackers
On Wed, Jan 18, 2017 at 3:06 AM, Gilles Darold <gilles.darold@dalibo.com> wrote:
> This have already been discuted previously in this thread, one of my
> previous patch version has implemented this behavior but we decide that
> what we really want is to be able to use the function using the
> following simple query:
>
>     SELECT pg_read_file(pg_current_logfiles());
>
> and not something like
>
>     SELECT pg_read_file(SELECT file FROM pg_current_logfiles() LIMIT 1);
> or
>     SELECT pg_read_file(SELECT file FROM pg_current_logfiles() WHERE
> method='stderr');
>
> You can also obtain the "kind" of output from the SRF function using:
>
>     SELECT pg_read_file('current_logfiles');

I don't really understand this argument as you can do that as well:
SELECT pg_read_file(file) FROM pg_current_logfiles WHERE method = 'stderr';

> I'm not against adding a warning or error message here even if it may
> never occurs, but we need a new error code as it seems to me that no
> actual error code can be used.

ERRCODE_INTERNAL_ERROR, no?
-- 
Michael



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] increasing the default WAL segment size
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Patch to implement pg_current_logfile() function