Re: Reporting hba lines
От | Tom Lane |
---|---|
Тема | Re: Reporting hba lines |
Дата | |
Msg-id | 29678.1340806473@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Reporting hba lines (Magnus Hagander <magnus@hagander.net>) |
Ответы |
Re: Reporting hba lines
|
Список | pgsql-hackers |
Magnus Hagander <magnus@hagander.net> writes: > On Wed, Jun 27, 2012 at 3:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> BTW, are you sure that auth_failed is only called in cases where >> an hba line has already been identified? Even if true today, >> it seems fairly risky to assume that. > It is true today, but yes, it might be safe to guard against it with > something like this? FWIW, the usual approach for conditionally emitting bits of an ereport is more like ereport(FATAL, (errcode(errcode_return), errmsg(errstr, port->user_name), port->hba ? errdetail_log("Connectionmatched pg_hba.conf line %d", port->hba->linenumber) : 0)); but that's just a nitpick. A bigger issue is that I'm not convinced that a line number will be tremendously helpful: it's easy to miscount lines, and a line number will certainly not be helpful in the frequent cases where people are modifying the wrong hba file. Can we show the source text of the hba line? regards, tom lane
В списке pgsql-hackers по дате отправления: