MichaelDBA/pg_get_tabledef

Missing WITH clauses in View definition

ivasilov opened this issue · 2 comments

If I create a view with this query:

CREATE VIEW myView WITH (security_invoker=true) AS SELECT 'Hello World';

when I try to get its definition by running select pg_get_viewdef('public.myView', true) as definition I get:

[{"definition":" SELECT 'Hello World'::text AS \"?column?\";"}]

Now that I look at it more closely, the pg_get_viewdef function doesn't support views very well :(.

What does that have to do with the single focus on this project, pg_get_tabledef()?

Closing due to out of project scope