Re: Improved security for https://www.postgresql.org/docs/current/install-make.html

2024-11-11 Thread Peter Eisentraut

On 06.11.24 22:58, PG Doc comments form wrote:

The 'short' script can then be rewritten as

```
# work done as a regular user
./configure
make build

# work that requires ROOT access
su
mkdir /usr/local/pgsql/data
chown (current user):(current group) /usr/local/pgsql
adduser --system --group postgres
exit

# work that requires POSTGRES access
su -u postgres
make install installdirs
exit


We don't want the installed files to be owned by postgres.  That would 
mean that a compromised PostgreSQL server (running as "postgres") could 
overwrite its own installation files.  You don't have to use "root" for 
the installation, of course, but it should be separate from "postgres".






Re: Documentation error in tutorial page for Window Functions

2024-11-11 Thread David G. Johnston
On Sunday, November 10, 2024, PG Doc comments form 
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/17/tutorial-window.html
> Description:
>
> In Section 3.5 Window Functions, the sentence that currently says:
> "As shown here, the rank function produces a numerical rank for each
> distinct ORDER BY value in the current row's partition..."
>
> should say:
> "As shown here, the rank function produces a numerical rank for each
> distinct depname value in the current row's partition..."
>
> https://www.postgresql.org/docs/current/tutorial-window.html
>

If we wanted to name the relevant column it would be salary, not depname.
It is the column(s) in the order by that matter here.  Or I suppose the
combination of depname and salary.  Though it was already covered that each
partition resets all aggregates.  Here we are not talking about reset but
when something increments.

David J.