On Fri, 2023-07-28 at 07:33 +0200, Asier Lostalé wrote:
> Is there any way to get the original sql text used to create the view?
PostgreSQL does not retain that information.
Perhaps you could use comments:
COMMENT ON VIEW whatever IS 'source code';
Yours,
Laurenz Albe