Thread
Commits
-
doc: Remove reference to views for TRUNCATE privilege
- d43e23505285 12.6 landed
- 2378d9232ea9 13.2 landed
- 32bef7582961 14.0 landed
-
TRUNCATE VIEW
The Post Office <noreply@postgresql.org> — 2021-01-25T12:06:08Z
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/12/ddl-priv.html Description: Dear Team, In this link https://www.postgresql.org/docs/12/ddl-priv.html you mentioned like Truncate of view, Is it possible? TRUNCATE Allows TRUNCATE on a table, view, etc.
-
Re: TRUNCATE VIEW
Laurenz Albe <laurenz.albe@cybertec.at> — 2021-01-25T12:38:52Z
On Mon, 2021-01-25 at 12:06 +0000, PG Doc comments form wrote: > In this link https://www.postgresql.org/docs/12/ddl-priv.html you mentioned > like Truncate of view, Is it possible? > > TRUNCATE > Allows TRUNCATE on a table, view, etc. Yes, if you define an INSTEAD OF TRUNCATE trigger on the view. Yours, Laurenz Albe
-
Re: TRUNCATE VIEW
harisai hari <harisai.58@gmail.com> — 2021-01-25T13:15:23Z
Could you please provide documentation link, I couldn't find it. On Mon, 25 Jan 2021, 6:08 pm Laurenz Albe, <laurenz.albe@cybertec.at> wrote: > On Mon, 2021-01-25 at 12:06 +0000, PG Doc comments form wrote: > > In this link https://www.postgresql.org/docs/12/ddl-priv.html you > mentioned > > like Truncate of view, Is it possible? > > > > TRUNCATE > > Allows TRUNCATE on a table, view, etc. > > Yes, if you define an INSTEAD OF TRUNCATE trigger on the view. > > Yours, > Laurenz Albe > >
-
Re: TRUNCATE VIEW
Laurenz Albe <laurenz.albe@cybertec.at> — 2021-01-25T15:22:58Z
On Mon, 2021-01-25 at 18:45 +0530, harisai hari wrote: > > On Mon, 25 Jan 2021, 6:08 pm Laurenz Albe, <laurenz.albe@cybertec.at> wrote: > > On Mon, 2021-01-25 at 12:06 +0000, PG Doc comments form wrote: > > > In this link https://www.postgresql.org/docs/12/ddl-priv.html you mentioned > > > like Truncate of view, Is it possible? > > > > > > TRUNCATE > > > Allows TRUNCATE on a table, view, etc. > > > > Yes, if you define an INSTEAD OF TRUNCATE trigger on the view. > > Could you please provide documentation link, I couldn't find it. Checking again, I realize that I wrote nonsense, and you are right. I concur that this should be simplified to Allows TRUNCATE on a table. Yours, Laurenz Albe
-
Re: TRUNCATE VIEW
harisai hari <harisai.58@gmail.com> — 2021-01-25T15:23:39Z
Thank you! On Mon, 25 Jan 2021, 8:53 pm Laurenz Albe, <laurenz.albe@cybertec.at> wrote: > On Mon, 2021-01-25 at 18:45 +0530, harisai hari wrote: > > > > On Mon, 25 Jan 2021, 6:08 pm Laurenz Albe, <laurenz.albe@cybertec.at> > wrote: > > > On Mon, 2021-01-25 at 12:06 +0000, PG Doc comments form wrote: > > > > In this link https://www.postgresql.org/docs/12/ddl-priv.html you > mentioned > > > > like Truncate of view, Is it possible? > > > > > > > > TRUNCATE > > > > Allows TRUNCATE on a table, view, etc. > > > > > > Yes, if you define an INSTEAD OF TRUNCATE trigger on the view. > > > > Could you please provide documentation link, I couldn't find it. > > Checking again, I realize that I wrote nonsense, and you are right. > > I concur that this should be simplified to > > Allows TRUNCATE on a table. > > Yours, > Laurenz Albe > >
-
Re: TRUNCATE VIEW
Michael Paquier <michael@paquier.xyz> — 2021-01-26T00:54:48Z
On Mon, Jan 25, 2021 at 08:53:39PM +0530, harisai hari wrote: > Thank you! Yes, this page is wrong to tell that. There is a second thing that I find confusing in the docs of TRUNCATE: https://www.postgresql.org/docs/devel/sql-truncate.html This does not mention at all partitioned tables, describing only "descendant tables". Partitioning is a case of "descendant tables" but that's a bit confusing IMO and a reader would need to guess that. Thoughts? -- Michael
-
Re: TRUNCATE VIEW
Michael Paquier <michael@paquier.xyz> — 2021-01-27T04:44:11Z
On Tue, Jan 26, 2021 at 09:54:48AM +0900, Michael Paquier wrote: > Yes, this page is wrong to tell that. This one has been fixed with 32bef75 down to 12. > There is a second thing that I find confusing in the docs of > TRUNCATE: > https://www.postgresql.org/docs/devel/sql-truncate.html > > This does not mention at all partitioned tables, describing only > "descendant tables". Partitioning is a case of "descendant tables" > but that's a bit confusing IMO and a reader would need to guess that. Not sure what to do about this part yet. -- Michael