Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-07-11 Thread Tom Lane
Haribabu Kommi writes: > On Sat, Apr 9, 2016 at 6:36 AM, Tom Lane wrote: >> More generally, I'm not convinced about the use-case for this patch. >> What problem is it supposed to help in dealing with, exactly? Not syntax >> errors in the hba file,

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-07-10 Thread Haribabu Kommi
On Sat, Apr 9, 2016 at 6:36 AM, Tom Lane wrote: > > More generally, I'm not convinced about the use-case for this patch. > What problem is it supposed to help in dealing with, exactly? Not syntax > errors in the hba file, evidently, since it doesn't make any attempt to >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-04-08 Thread Robert Haas
On Fri, Apr 8, 2016 at 4:36 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Apr 8, 2016 at 3:24 PM, David Steele wrote: >>> Can one of the reviewers decide if this is ready to commit? I fear it >>> will be pushed to the next

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-04-08 Thread Tom Lane
Robert Haas writes: > On Fri, Apr 8, 2016 at 3:24 PM, David Steele wrote: >> Can one of the reviewers decide if this is ready to commit? I fear it >> will be pushed to the next CF otherwise. I don't think the committers >> have time to make that

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-04-08 Thread Robert Haas
On Fri, Apr 8, 2016 at 3:24 PM, David Steele wrote: > On 4/5/16 9:52 PM, Robert Haas wrote: >> On Mon, Mar 21, 2016 at 3:31 AM, Haribabu Kommi >> wrote: >>> On Mon, Mar 21, 2016 at 2:00 PM, Alvaro Herrera >>> wrote:

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-04-05 Thread Robert Haas
On Mon, Mar 21, 2016 at 3:31 AM, Haribabu Kommi wrote: > On Mon, Mar 21, 2016 at 2:00 PM, Alvaro Herrera > wrote: >> Haribabu Kommi wrote: >> >>> > Check. >>> > >>> > +} lookup_hba_line_context; >>> > ^ but why TAB here? >>> >>> corrected.

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-21 Thread Haribabu Kommi
On Mon, Mar 21, 2016 at 2:00 PM, Alvaro Herrera wrote: > Haribabu Kommi wrote: > >> > Check. >> > >> > +} lookup_hba_line_context; >> > ^ but why TAB here? >> >> corrected. I am not sure why pg_indent is adding a tab here. > > It's because lookup_hba_line_context is

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-20 Thread Alvaro Herrera
Haribabu Kommi wrote: > > Check. > > > > +} lookup_hba_line_context; > > ^ but why TAB here? > > corrected. I am not sure why pg_indent is adding a tab here. It's because lookup_hba_line_context is not listed in typedefs.list. I suggest adding it and all other new typedefs you add, and

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-20 Thread Haribabu Kommi
On Fri, Mar 18, 2016 at 7:46 PM, Shulgin, Oleksandr wrote: > On Fri, Mar 18, 2016 at 7:53 AM, Haribabu Kommi > wrote: >> >> On Thu, Mar 17, 2016 at 6:56 PM, Shulgin, Oleksandr >> wrote: >> > >> > You mean

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-19 Thread Shulgin, Oleksandr
On Fri, Mar 18, 2016 at 7:53 AM, Haribabu Kommi wrote: > > On Thu, Mar 17, 2016 at 6:56 PM, Shulgin, Oleksandr > wrote: > > > > You mean change context name and correct the comment? I didn't suggest to > > change the function name. > >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-19 Thread Shulgin, Oleksandr
On Thu, Mar 17, 2016 at 2:12 AM, Haribabu Kommi wrote: > On Wed, Mar 16, 2016 at 9:49 PM, Shulgin, Oleksandr > wrote: > > > > Some comments: > > > > +/* Context to use with hba_line_callback function. */ > > +typedef struct > > +{ > > +

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-19 Thread Haribabu Kommi
On Wed, Mar 16, 2016 at 9:49 PM, Shulgin, Oleksandr wrote: > On Tue, Mar 15, 2016 at 7:23 PM, David Steele wrote: >> >> On 3/3/16 12:16 AM, Haribabu Kommi wrote: >> > On Fri, Feb 5, 2016 at 2:29 PM, Haribabu Kommi >> >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-18 Thread Haribabu Kommi
On Thu, Mar 17, 2016 at 6:56 PM, Shulgin, Oleksandr wrote: > On Thu, Mar 17, 2016 at 2:12 AM, Haribabu Kommi > wrote: >> >> On Wed, Mar 16, 2016 at 9:49 PM, Shulgin, Oleksandr >> wrote: >> > >> > Some

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-16 Thread Shulgin, Oleksandr
On Tue, Mar 15, 2016 at 7:23 PM, David Steele wrote: > On 3/3/16 12:16 AM, Haribabu Kommi wrote: > > On Fri, Feb 5, 2016 at 2:29 PM, Haribabu Kommi > wrote: > >> > >> This patch needs to be applied on top discard_hba_and_ident_cxt patch > >> that

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-02 Thread Haribabu Kommi
On Fri, Feb 5, 2016 at 2:29 PM, Haribabu Kommi wrote: > >This patch needs to be applied on top discard_hba_and_ident_cxt patch >that is posted earlier. Here I attached a re-based patch to the latest head with inclusion of discard_hba_ident_cxt patch for easier review as

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-02-04 Thread Haribabu Kommi
On Tue, Feb 2, 2016 at 8:57 AM, Alvaro Herrera wrote: > Haribabu Kommi wrote: > >> Hi, Do you have any further comments on the patch that needs to be >> taken care? > > I do. I think the jsonb functions you added should be added to one of > the json .c files instead,

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-02-01 Thread Alvaro Herrera
Haribabu Kommi wrote: > Hi, Do you have any further comments on the patch that needs to be > taken care? I do. I think the jsonb functions you added should be added to one of the json .c files instead, since they seem of general applicability. But actually, I don't think you have ever replied

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-01-17 Thread Haribabu Kommi
On Thu, Dec 31, 2015 at 10:47 AM, Haribabu Kommi wrote: > On Wed, Dec 30, 2015 at 9:48 PM, Shulgin, Oleksandr > wrote: >> On Wed, Dec 30, 2015 at 4:31 AM, Haribabu Kommi >> wrote: >>> >>> >>> Adding quotes to

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-30 Thread Haribabu Kommi
On Wed, Dec 30, 2015 at 9:48 PM, Shulgin, Oleksandr wrote: > On Wed, Dec 30, 2015 at 4:31 AM, Haribabu Kommi > wrote: >> >> >> Adding quotes to pg_hba_lookup function makes it different from others. >> The issues regarding the same is

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-30 Thread Shulgin, Oleksandr
On Wed, Dec 30, 2015 at 4:31 AM, Haribabu Kommi wrote: > > Adding quotes to pg_hba_lookup function makes it different from others. > The issues regarding the same is already discussed in [1]. > > select a.database[1], b.datname from >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-29 Thread Haribabu Kommi
On Wed, Dec 30, 2015 at 1:07 AM, Shulgin, Oleksandr wrote: > > This is close enough, but what I actually mean by "a callback" is more or > less like the attached version. Thanks for the changes. > While at it, I've also added some trivial code to preserve keyword

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-29 Thread Shulgin, Oleksandr
On Tue, Dec 29, 2015 at 4:15 AM, Haribabu Kommi wrote: > On Mon, Dec 28, 2015 at 9:09 PM, Shulgin, Oleksandr > wrote: > > > > Still this requires a revert of the memory context handling commit for > > load_hba() and load_ident(). I think

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-28 Thread Shulgin, Oleksandr
On Thu, Dec 24, 2015 at 5:16 AM, Haribabu Kommi wrote: > On Thu, Dec 24, 2015 at 2:37 AM, Tom Lane wrote: > > "Shulgin, Oleksandr" writes: > >> 1. Have you considered re-loading the HBA file upon call to this >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-28 Thread Haribabu Kommi
On Mon, Dec 28, 2015 at 9:09 PM, Shulgin, Oleksandr wrote: > On Thu, Dec 24, 2015 at 5:16 AM, Haribabu Kommi > wrote: >> >> On Thu, Dec 24, 2015 at 2:37 AM, Tom Lane wrote: >> > "Shulgin, Oleksandr"

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-23 Thread Shulgin, Oleksandr
On Wed, Dec 16, 2015 at 9:33 AM, Haribabu Kommi wrote: > > Function is changed to accept default values. > > Apart from the above, added a local memory context to allocate the memory > required for forming tuple for each line. This context resets for every > hba line >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-23 Thread Haribabu Kommi
On Wed, Dec 23, 2015 at 8:54 PM, Shulgin, Oleksandr wrote: > On Wed, Dec 16, 2015 at 9:33 AM, Haribabu Kommi > wrote: >> >> >> Function is changed to accept default values. >> >> Apart from the above, added a local memory context to

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-23 Thread Shulgin, Oleksandr
On Wed, Dec 23, 2015 at 12:56 PM, Haribabu Kommi wrote: > On Wed, Dec 23, 2015 at 8:54 PM, Shulgin, Oleksandr > wrote: > > > > 1. Have you considered re-loading the HBA file upon call to this > function in > > a local context instead of

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-23 Thread Tom Lane
"Shulgin, Oleksandr" writes: > 1. Have you considered re-loading the HBA file upon call to this function > in a local context instead of keeping it in the backends memory? Aside from the security questions, please consider that this feature should work similarly to

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-23 Thread Michael Paquier
On Wed, Dec 23, 2015 at 8:56 PM, Haribabu Kommi wrote: > On Wed, Dec 23, 2015 at 8:54 PM, Shulgin, Oleksandr > wrote: >> 5. Some tests demonstrating possible output would be really nice to have. > > Do you mean regression tests? In case of

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-23 Thread Haribabu Kommi
On Thu, Dec 24, 2015 at 2:37 AM, Tom Lane wrote: > "Shulgin, Oleksandr" writes: >> 1. Have you considered re-loading the HBA file upon call to this function >> in a local context instead of keeping it in the backends memory? > > Aside from the

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-16 Thread Haribabu Kommi
On Wed, Dec 16, 2015 at 8:19 AM, Tomas Vondra wrote: > Hi, > > I've reviewed the patch today, after re-reading the whole discussion. Thanks for the review. > The one unsolved issue is what to do with 1e24cf64. My understanding is that > the current patch still

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-15 Thread Tomas Vondra
Hi, I've reviewed the patch today, after re-reading the whole discussion. Overall I'm quite happy with the design - a function is certainly better for the use-case. Not just because of the keyword handling issues, but because the checks happen in a particular order and terminate once a match

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Haribabu Kommi
On Wed, Dec 9, 2015 at 5:31 PM, Amit Kapila wrote: > > Another bigger issue I see in the above part of code is that it doesn't > seem to be safe to call load_hba() at that place in PostgresMain() as > currently load_hba() is using a context created from PostmasterContext

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Alvaro Herrera
Haribabu Kommi wrote: > Reverting the context release patch is already provided in the first > mail of this > thread [1]. Forgot to mention about the same in further mails. > > Here I attached the same patch. This patch needs to be applied first before > pg_hba_lookup patch. I tested it in

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Haribabu Kommi
On Thu, Dec 10, 2015 at 4:22 AM, Alvaro Herrera wrote: > Haribabu Kommi wrote: > >> Reverting the context release patch is already provided in the first >> mail of this >> thread [1]. Forgot to mention about the same in further mails. >> >> Here I attached the same

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Amit Kapila
On Thu, Dec 10, 2015 at 9:51 AM, Haribabu Kommi wrote: > > On Thu, Dec 10, 2015 at 2:29 PM, Amit Kapila wrote: > > How about creating "hba parser context" and "ident parser context" > > at the beginning of their respective functions and don't

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Amit Kapila
On Thu, Dec 10, 2015 at 6:46 AM, Haribabu Kommi wrote: > > On Thu, Dec 10, 2015 at 4:22 AM, Alvaro Herrera > wrote: > > Haribabu Kommi wrote: > > > >> Reverting the context release patch is already provided in the first > >> mail of this > >>

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Haribabu Kommi
On Thu, Dec 10, 2015 at 2:29 PM, Amit Kapila wrote: > On Thu, Dec 10, 2015 at 6:46 AM, Haribabu Kommi > wrote: >> >> On Thu, Dec 10, 2015 at 4:22 AM, Alvaro Herrera >> wrote: >> > Haribabu Kommi wrote: >> > >> >>

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Amit Kapila
On Wed, Dec 9, 2015 at 2:35 PM, Haribabu Kommi wrote: > > > Reverting the context release patch is already provided in the first > mail of this > thread [1]. Forgot to mention about the same in further mails. > Thanks, that is helpful. However I think it is better if

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-09 Thread Haribabu Kommi
On Thu, Dec 10, 2015 at 4:33 PM, Amit Kapila wrote: > On Thu, Dec 10, 2015 at 9:51 AM, Haribabu Kommi > wrote: >> >> On Thu, Dec 10, 2015 at 2:29 PM, Amit Kapila >> wrote: > >> > How about creating "hba parser context"

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-08 Thread Amit Kapila
On Tue, Dec 8, 2015 at 9:41 AM, Haribabu Kommi wrote: > > On Sat, Dec 5, 2015 at 3:31 AM, Alvaro Herrera wrote: > > Haribabu Kommi wrote: > > > >> How about as follows? > >> > >> postgres=# select * from pg_hba_lookup('all','all','::1'); > >>

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-08 Thread Haribabu Kommi
On Wed, Dec 9, 2015 at 2:36 AM, Amit Kapila wrote: > > Few assorted comments: Thanks for the review. > 1. > + /* > + * SQL-accessible SRF to return all the settings from the pg_hba.conf > + * file. > + */ > + Datum > + pg_hba_lookup_2args(PG_FUNCTION_ARGS) > + { > +

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-08 Thread Amit Kapila
On Wed, Dec 9, 2015 at 6:48 AM, Haribabu Kommi wrote: > > On Wed, Dec 9, 2015 at 2:36 AM, Amit Kapila wrote: > > > > I think it is better to have check on number of args in the > > above functions similar to what we have in

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-07 Thread Haribabu Kommi
On Sat, Dec 5, 2015 at 3:31 AM, Alvaro Herrera wrote: > Haribabu Kommi wrote: > >> How about as follows? >> >> postgres=# select * from pg_hba_lookup('all','all','::1'); >> line_number | type | database | user | address | hostname | method | >> options | mode >>

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-04 Thread Pavel Stehule
2015-12-04 17:34 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > > It should be disabled by default > > > > only when you have some problems, then you can enable it > > That still seems mostly unworkable to me. Are we going to tell DBAs to > set PGOPTIONS when

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-04 Thread Pavel Stehule
2015-12-04 17:16 GMT+01:00 Alvaro Herrera : > Haribabu Kommi wrote: > > > The trace messages that are going to print doesn't come to client until > the > > connection gets successful. The traces may not useful for the clients > > to find out > > why the connection is

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-04 Thread Alvaro Herrera
Haribabu Kommi wrote: > The trace messages that are going to print doesn't come to client until the > connection gets successful. The traces may not useful for the clients > to find out > why the connection is failing. But it may be useful for administrators. > How about the attached patch? > >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-04 Thread Alvaro Herrera
Haribabu Kommi wrote: > How about as follows? > > postgres=# select * from pg_hba_lookup('all','all','::1'); > line_number | type | database | user | address | hostname | method | > options | mode >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-04 Thread Alvaro Herrera
Pavel Stehule wrote: > It should be disabled by default > > only when you have some problems, then you can enable it That still seems mostly unworkable to me. Are we going to tell DBAs to set PGOPTIONS when they have some pg_hba problem? What's the issue with calling the function when you

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-03 Thread Haribabu Kommi
On Fri, Dec 4, 2015 at 7:45 AM, Pavel Stehule wrote: > > > this tracing can be implemented to main pg_hba processing. When you are > connect from some specific client - and you can see, why you cannot to > connect to Postgres The trace messages that are going to print

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-03 Thread Haribabu Kommi
On Fri, Dec 4, 2015 at 8:05 AM, Alvaro Herrera wrote: >> >> Here I attached the patch with the suggested changes. >> >> Along with line number, I kept the options column also with authentication >> >> options as a jsonb datatype. >> >> >> >> Example output: >> >> >> >>

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-03 Thread Pavel Stehule
2015-12-04 5:48 GMT+01:00 Haribabu Kommi : > On Fri, Dec 4, 2015 at 7:45 AM, Pavel Stehule > wrote: > > > > > > this tracing can be implemented to main pg_hba processing. When you are > > connect from some specific client - and you can see, why

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-03 Thread Pavel Stehule
2015-12-04 5:33 GMT+01:00 Haribabu Kommi : > On Fri, Dec 4, 2015 at 8:05 AM, Alvaro Herrera > wrote: > >> >> Here I attached the patch with the suggested changes. > >> >> Along with line number, I kept the options column also with >

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-03 Thread Alvaro Herrera
> >> Here I attached the patch with the suggested changes. > >> Along with line number, I kept the options column also with authentication > >> options as a jsonb datatype. > >> > >> Example output: > >> > >> postgres=# select pg_hba_lookup('test','all','::1'); > >> NOTICE: Skipped 84 Hba line,

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-03 Thread Pavel Stehule
2015-12-03 5:53 GMT+01:00 Pavel Stehule : > > > 2015-12-03 5:00 GMT+01:00 Haribabu Kommi : > >> On Wed, Nov 25, 2015 at 7:18 PM, Pavel Stehule >> wrote: >> > >> > >> > 2015-11-25 8:05 GMT+01:00 Haribabu Kommi

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-02 Thread Haribabu Kommi
On Wed, Nov 25, 2015 at 7:18 PM, Pavel Stehule wrote: > > > 2015-11-25 8:05 GMT+01:00 Haribabu Kommi : >> >> >> Thanks. Here I attached the poc patch that returns authentication method >> of the >> first matched hba entry in pg_hba.conf with the

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-02 Thread Pavel Stehule
2015-12-03 5:00 GMT+01:00 Haribabu Kommi : > On Wed, Nov 25, 2015 at 7:18 PM, Pavel Stehule > wrote: > > > > > > 2015-11-25 8:05 GMT+01:00 Haribabu Kommi : > >> > >> > >> Thanks. Here I attached the poc patch that

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-11-25 Thread Pavel Stehule
2015-11-25 8:05 GMT+01:00 Haribabu Kommi : > On Tue, Nov 17, 2015 at 9:37 AM, Peter Eisentraut wrote: > > On 11/16/15 2:37 AM, Haribabu Kommi wrote: > >> On Mon, Nov 16, 2015 at 2:30 PM, Peter Eisentraut > wrote: > >>> On 7/21/15 5:15

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-11-24 Thread Haribabu Kommi
On Tue, Nov 17, 2015 at 9:37 AM, Peter Eisentraut wrote: > On 11/16/15 2:37 AM, Haribabu Kommi wrote: >> On Mon, Nov 16, 2015 at 2:30 PM, Peter Eisentraut wrote: >>> On 7/21/15 5:15 AM, Haribabu Kommi wrote: With the output of this view, administrator can

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-11-16 Thread Peter Eisentraut
On 11/16/15 2:37 AM, Haribabu Kommi wrote: > On Mon, Nov 16, 2015 at 2:30 PM, Peter Eisentraut wrote: >> On 7/21/15 5:15 AM, Haribabu Kommi wrote: >>> With the output of this view, administrator can identify the lines >>> that are matching for the given >>> criteria easily

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-11-15 Thread Peter Eisentraut
On 7/21/15 5:15 AM, Haribabu Kommi wrote: > With the output of this view, administrator can identify the lines > that are matching for the given > criteria easily without going through the file. How is this useful? I could see the use if you want to debug cases of user foo on host bar says they

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-11-15 Thread Haribabu Kommi
On Mon, Nov 16, 2015 at 2:30 PM, Peter Eisentraut wrote: > On 7/21/15 5:15 AM, Haribabu Kommi wrote: >> With the output of this view, administrator can identify the lines >> that are matching for the given >> criteria easily without going through the file. > > How is this useful?

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-15 Thread Pavel Stehule
Hi 2015-07-21 11:15 GMT+02:00 Haribabu Kommi : > Hi Hackers, > > This is the patch adds a new function called pg_hba_lookup to get all > matching entries > from the pg_hba.conf for the providing input data.The rows are > displayed from the other > the hba conf entries

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-07 Thread Haribabu Kommi
On Mon, Sep 7, 2015 at 4:34 AM, Pavel Stehule wrote: > Hi > > >> >> postgres=# select pg_hba_lookup('postgres','all'); >> pg_hba_lookup >> --- >> (84,local,"[""all""]","[""all""]",,,trust,{}) >>

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-06 Thread Pavel Stehule
Hi > Any suggestions/comments on this proposed approach? > This is interesting functionality - The same was requested by one important Czech customer. I'll do review Regards Pavel

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-06 Thread Pavel Stehule
Hi > postgres=# select pg_hba_lookup('postgres','all'); > pg_hba_lookup > --- > (84,local,"[""all""]","[""all""]",,,trust,{}) > (86,host,"[""all""]","[""all""]",127.0.0.1,,trust,{}) >