Re: an difficult SQL

2022-11-05 Thread Thiemo Kellner
Hi Rafal You first could select the three users with the most recent entries with a windowing function (https://www.postgresql.org/docs/15/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS) putting it into a with query (https://www.postgresql.org/docs/15/sql-select.html), in following with querie

an difficult SQL

2022-11-05 Thread Rafal Pietrak
Hi Everybody, I was wondering if anybody here could help me cook up a query: 1. against a list of events (like an activity log in the database). The list is a single table: create table events (tm timestamp, user int, description text). 2. of which the output would be sorted in such a way, t

Re: Postgres 15 upgrades and template1 public schema

2022-11-05 Thread Bruno Wolff III
On Wed, Oct 19, 2022 at 19:59:52 -0400, Tom Lane wrote: The release notes could probably use some tweaking here. It looks to me like pg_dumpall (and hence pg_upgrade) will adjust the ownership and permissions of template1's public schema to match what was in the old installation, but it doesn