Re: pg_hba_file_settings view patch - Mailing list pgsql-hackers

From Vitaly Burovoy
Subject Re: pg_hba_file_settings view patch
Date
Msg-id CAKOSWNkNhn7umqE=J+LQgxFtD+aj-dNEQg2UwEeBaZUZB3o+Eg@mail.gmail.com
Whole thread Raw
In response to Re: pg_hba_file_settings view patch  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: pg_hba_file_settings view patch  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 10/2/16, Michael Paquier <michael.paquier@gmail.com> wrote:
> +       push_jsonb_string_key(&parseState, "map");
> +       push_jsonb_string_value(&parseState, hba->usermap);
> [...]
> +    <row>
> +     <entry><structfield>options</structfield></entry>
> +     <entry><type>jsonb</type></entry>
> +     <entry>Configuration options set for authentication method</entry>
> +    </row>
> Why is it an advantage to use jsonb here instead of a simple array
> made of name=value? If they were nested I'd see a case for it but it
> seems to me that as presented this is just an overkill.

I guess for ability to use filtering like:

SELECT * FROM pg_hba_rules WHERE options->>radiusserver LIKE '%.example.com';

I think it would be harder if options is an array of strings...

-- 
Best regards,
Vitaly Burovoy



pgsql-hackers by date:

Previous
From: Andrew Borodin
Date:
Subject: Re: GiST penalty functions [PoC]
Next
From: Michael Paquier
Date:
Subject: Re: pg_hba_file_settings view patch