Hi! Today, I made an astonishing / disappointing experience related to that source code topic: You may not be able to delete tables / views that are referenced by other users objects, e.g. views. Unless you add the CASCADE option which will cause all depending views to be deleted as well. And the CASCASE will work and delete the other users view even when you don't have the permission to drop that other users view! Looks like the Oracle concept of marking views as invalid makes some sense... Regards, Ingolf -----Original Message----- From: Paul Förster [mailto:paul.foerster@xxxxxxxxx] Sent: 14 January 2021 07:16 To: Cybertec Schönig & Schönig GmbH <laurenz.albe@xxxxxxxxxxx> Cc: Adam Brusselback <adambrusselback@xxxxxxxxx>; David G. Johnston <david.g.johnston@xxxxxxxxx>; raf <raf@xxxxxxx>; pgsql-generallists.postgresql.org <pgsql-general@xxxxxxxxxxxxxxxxxxxx> Subject: [E] Re: How to keep format of views source code as entered? Hi Laurenz, > On 14. Jan, 2021, at 04:59, Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote: > > If PostgreSQL were to store the original text, either that text would become > wrong, or you would have to forbid renaming of anything that is referenced > by a view. this is why views, procedures, functions and packages can become invalid in Oracle, which I really hate because as a DBA, it's almost impossible to quickly see (or in fact see at all) why this happens, or having to debug applications that you don't know and/or can't fix anyway. Oracle's invalid object concept doesn't make sense. So, I'm not at all in favor of saving the original statement text. Cheers, Paul Verizon Deutschland GmbH - Sebrathweg 20, 44149 Dortmund, Germany - Amtsgericht Dortmund, HRB 14952 - Geschäftsführer: Detlef Eppig - Vorsitzender des Aufsichtsrats: Francesco de Maio