Skip to main content

view_statement

Function view_statement 

Source
pub fn view_statement(
    query: &Query,
    name: &str,
    columns: &[String],
    session: &dyn Session,
) -> Result<String>
Expand description

The text of a CREATE VIEW statement that makes the view name again with the query and the names of its columns, as pg_get_viewdef_worker gives the query. The catalog keeps the text of a view, and the text names the objects that the query reads, so ALTER ... RENAME writes the text again from the query of the old names.

ยงErrors

The errors of the deparse.