Doc patch, normalize search_path in index

Lists: pgsql-hackers
From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Doc patch, normalize search_path in index
Date: 2012-09-28 17:40:38
Message-ID: 1348854038.13705.10@mofo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

The attached patch (against git head)
normalizes "search_path" as the thing indexed
and uses a secondary index term to distinguish
the configuration parameter from the run-time
setting.

"search path" the concept remains distinguished
in the index from "search_path" the setting/config param.
It's hard to say whether it's useful to make this
distinction. From a practical perspective it's easy
for the eye to stop scanning when the indent
level changes and so fail to notice that both
"search path" and "search_path" are index
entries. At least the index is a
lot more tidy than before.

Regards,

Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

Attachment Content-Type Size
search_path-normalize.patch text/x-patch 1015 bytes

From: Dan Scott <denials(at)gmail(dot)com>
To: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2012-10-01 03:35:42
Message-ID: CAAY5AM0Fs4K5hRQfCkEH1a84acHQmr6ZRYi67YixvhgLkbPTEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Sep 28, 2012 at 1:40 PM, Karl O. Pinc <kop(at)meme(dot)com> wrote:
> Hi,
>
> The attached patch (against git head)
> normalizes "search_path" as the thing indexed
> and uses a secondary index term to distinguish
> the configuration parameter from the run-time
> setting.

Makes sense to me, although I suspect the conceptual material is
better served by the "search path"-the-concept index entry and the
reference material by the "search_path configuration parameter" entry
(so, from that perspective, perhaps the patch should just be to remove
the "search_path" index entry from the DDL schemas conceptual
section).

> "search path" the concept remains distinguished
> in the index from "search_path" the setting/config param.
> It's hard to say whether it's useful to make this
> distinction.

I think that indexing "search path"-the-concept is useful for
translations, and the Japanese translation includes an index (I
couldn't find the index for the French translation).

--
Dan Scott
Laurentian University


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 17:50:03
Message-ID: 20130125175003.GC6848@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Sep 28, 2012 at 12:40:38PM -0500, Karl O. Pinc wrote:
> Hi,
>
> The attached patch (against git head)
> normalizes "search_path" as the thing indexed
> and uses a secondary index term to distinguish
> the configuration parameter from the run-time
> setting.
>
> "search path" the concept remains distinguished
> in the index from "search_path" the setting/config param.
> It's hard to say whether it's useful to make this
> distinction. From a practical perspective it's easy
> for the eye to stop scanning when the indent
> level changes and so fail to notice that both
> "search path" and "search_path" are index
> entries. At least the index is a
> lot more tidy than before.

I have applied a modified version of your patch that creates separate
secondary index references for search_path.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
search_path.diff text/x-diff 2.2 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 18:35:49
Message-ID: 15988.1359138949@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> I have applied a modified version of your patch that creates separate
> secondary index references for search_path.

This patch seems pretty bizarre. What is the difference between a
"configuration parameter" and a "run-time setting"? Why would you
point people to two different places for those two terms?

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 18:41:43
Message-ID: 20130125184143.GF6848@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 25, 2013 at 01:35:49PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I have applied a modified version of your patch that creates separate
> > secondary index references for search_path.
>
> This patch seems pretty bizarre. What is the difference between a
> "configuration parameter" and a "run-time setting"? Why would you
> point people to two different places for those two terms?

I think he is trying to distinguish between the parameter and the
setting of the parameter, and also its use for security. No one really
replied to the email so I thought the distinction was accpetable.

Should I make them both "configuration parameter" and leave the
"security" as a second one separate?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 18:42:48
Message-ID: 16241.1359139368@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Fri, Jan 25, 2013 at 01:35:49PM -0500, Tom Lane wrote:
>> This patch seems pretty bizarre. What is the difference between a
>> "configuration parameter" and a "run-time setting"? Why would you
>> point people to two different places for those two terms?

> Should I make them both "configuration parameter" and leave the
> "security" as a second one separate?

Works for me. I think "configuration parameter" is the phrase we
use most places.

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 18:45:23
Message-ID: 20130125184523.GH6848@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 25, 2013 at 01:42:48PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Fri, Jan 25, 2013 at 01:35:49PM -0500, Tom Lane wrote:
> >> This patch seems pretty bizarre. What is the difference between a
> >> "configuration parameter" and a "run-time setting"? Why would you
> >> point people to two different places for those two terms?
>
> > Should I make them both "configuration parameter" and leave the
> > "security" as a second one separate?
>
> Works for me. I think "configuration parameter" is the phrase we
> use most places.

OK, attached patch applied.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
search_path2.diff text/x-diff 568 bytes

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 18:46:46
Message-ID: 5102D316.3040000@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 1/25/13 12:50 PM, Bruce Momjian wrote:
> On Fri, Sep 28, 2012 at 12:40:38PM -0500, Karl O. Pinc wrote:
>> Hi,
>>
>> The attached patch (against git head)
>> normalizes "search_path" as the thing indexed
>> and uses a secondary index term to distinguish
>> the configuration parameter from the run-time
>> setting.
>>
>> "search path" the concept remains distinguished
>> in the index from "search_path" the setting/config param.
>> It's hard to say whether it's useful to make this
>> distinction. From a practical perspective it's easy
>> for the eye to stop scanning when the indent
>> level changes and so fail to notice that both
>> "search path" and "search_path" are index
>> entries. At least the index is a
>> lot more tidy than before.
>
> I have applied a modified version of your patch that creates separate
> secondary index references for search_path.

This matter was already closed:
https://commitfest.postgresql.org/action/patch_view?id=949

It looks like your patch reverts part of that.


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 18:59:41
Message-ID: 20130125185941.GJ6848@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 25, 2013 at 01:46:46PM -0500, Peter Eisentraut wrote:
> On 1/25/13 12:50 PM, Bruce Momjian wrote:
> > On Fri, Sep 28, 2012 at 12:40:38PM -0500, Karl O. Pinc wrote:
> >> Hi,
> >>
> >> The attached patch (against git head)
> >> normalizes "search_path" as the thing indexed
> >> and uses a secondary index term to distinguish
> >> the configuration parameter from the run-time
> >> setting.
> >>
> >> "search path" the concept remains distinguished
> >> in the index from "search_path" the setting/config param.
> >> It's hard to say whether it's useful to make this
> >> distinction. From a practical perspective it's easy
> >> for the eye to stop scanning when the indent
> >> level changes and so fail to notice that both
> >> "search path" and "search_path" are index
> >> entries. At least the index is a
> >> lot more tidy than before.
> >
> > I have applied a modified version of your patch that creates separate
> > secondary index references for search_path.
>
> This matter was already closed:
> https://commitfest.postgresql.org/action/patch_view?id=949
>
> It looks like your patch reverts part of that.

Uh, I am confused because the patch at:

https://commitfest.postgresql.org/action/patch_view?id=950
http://www.postgresql.org/message-id/1352874080.4647.0@mofo

shows "configuration parameter" being moved to <secondary>, though this
commit:

http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=a301eb99c9537186f7dd46ba418e84d755227a94

shows it not as secondary. Would you please suggest a patch or patch
it? Thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +


From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 20:15:18
Message-ID: 1359144918.16857.3@mofo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/25/2013 12:35:49 PM, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I have applied a modified version of your patch that creates
> separate
> > secondary index references for search_path.
>
> This patch seems pretty bizarre. What is the difference between a
> "configuration parameter" and a "run-time setting"? Why would you
> point people to two different places for those two terms?

One was the setting/querying of the parameter, the other the
purpose/impact of the setting. Somewhere in there I'm also
thinking it's a matter of the lexical token used v.s.
the functionality manipulated. One would have an _ in
between the words of the index entry, the other wouldn't.
The distinction would get all messed up by the browser
when it underlined hyperlinks.

I no longer recall the point
in making the distinction, although I believe that it came
from something to do with the vocabulary already in place
involving indexing settings and what they do. Or maybe I made it up.
In any case I don't think that the patch the Peter pushed
when he closed the commitfest entry made any distinction
between the token and the concept. Given that the difference
in sort order is the presence/absence of an _, and the
way hyperlinks are represented, I think this made the
the resulting index look best.

There was also a "use of search path to secure functions"
indexing wrapped in with the rest of the patch.

Hope this helps.

Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-25 22:10:14
Message-ID: 510302C6.5030403@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 1/25/13 1:59 PM, Bruce Momjian wrote:
> On Fri, Jan 25, 2013 at 01:46:46PM -0500, Peter Eisentraut wrote:
>> This matter was already closed:
>> https://commitfest.postgresql.org/action/patch_view?id=949
>>
>> It looks like your patch reverts part of that.
>
> Uh, I am confused because the patch at:
>
> https://commitfest.postgresql.org/action/patch_view?id=950
> http://www.postgresql.org/message-id/1352874080.4647.0@mofo
>
> shows "configuration parameter" being moved to <secondary>, though this
> commit:
>
> http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=a301eb99c9537186f7dd46ba418e84d755227a94

The discussion yielded a patch that is different from the commit fest entry.

We index all GUC settings as

<primary><varname>something</varname> configuration parameter</primary>

which the commit a301eb99c9537186f7dd46ba418e84d755227a94 also made the case for search_path.

Your two commits changed that again.

> shows it not as secondary. Would you please suggest a patch or patch
> it? Thanks.

I think both of your commits should be reverted.


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc patch, normalize search_path in index
Date: 2013-01-26 01:55:41
Message-ID: 20130126015541.GD28591@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 25, 2013 at 05:10:14PM -0500, Peter Eisentraut wrote:
> On 1/25/13 1:59 PM, Bruce Momjian wrote:
> > On Fri, Jan 25, 2013 at 01:46:46PM -0500, Peter Eisentraut wrote:
> >> This matter was already closed:
> >> https://commitfest.postgresql.org/action/patch_view?id=949
> >>
> >> It looks like your patch reverts part of that.
> >
> > Uh, I am confused because the patch at:
> >
> > https://commitfest.postgresql.org/action/patch_view?id=950
> > http://www.postgresql.org/message-id/1352874080.4647.0@mofo
> >
> > shows "configuration parameter" being moved to <secondary>, though this
> > commit:
> >
> > http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=a301eb99c9537186f7dd46ba418e84d755227a94
>
> The discussion yielded a patch that is different from the commit fest entry.
>
> We index all GUC settings as
>
> <primary><varname>something</varname> configuration parameter</primary>
>
> which the commit a301eb99c9537186f7dd46ba418e84d755227a94 also made the case for search_path.
>
> Your two commits changed that again.
>
> > shows it not as secondary. Would you please suggest a patch or patch
> > it? Thanks.
>
> I think both of your commits should be reverted.

I now see the pattern. Thanks. Patches reverted.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +