Re: No docs for interaction of ON DELETE/UPDATE and permissions

2020-02-25 Thread Laurenz Albe
On Mon, 2020-02-24 at 14:45 -0800, David Glasser wrote: > I was planning to add a new table TA only writable by user A, with a foreign > key reference with > ON DELETE CASCADE to another table TB only writable by user B. My hope was > that user B would > still be allowed to delete rows in TB and

Re: No docs for interaction of ON DELETE/UPDATE and permissions

2020-02-25 Thread David Glasser
On Tue, Feb 25, 2020 at 1:54 AM Laurenz Albe wrote: > I am not sure if CREATE TABLE is the perfect place; another place that > would offer ifself is > https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK > , > where foreign key constraints are explained. I had found th

Better documentation for row_number() combined with set returning functions

2020-02-25 Thread Erik Tews
Hi The current documentation of Postgresql sounds like row_number() over () can be used to number the rows returned by postgres. However, that doesn't work when the query also uses set returning functions such as json_array_elements. In this case, row_number() will be the same for every element of