use a different query to fetch materialized view structure

This commit is contained in:
Dan Sosedoff
2016-01-17 15:00:33 -06:00
parent 84f1bd95e7
commit 3167d96cfc
6 changed files with 75 additions and 41 deletions
+4
View File
@@ -107,6 +107,10 @@ func (client *Client) Table(table string) (*Result, error) {
return client.query(statements.PG_TABLE_SCHEMA, schema, table)
}
func (client *Client) MaterializedView(name string) (*Result, error) {
return client.query(statements.PG_MATERIALIZED_VIEW_SCHEMA, name)
}
func (client *Client) TableRows(table string, opts RowsOptions) (*Result, error) {
schema, table := getSchemaAndTable(table)
sql := fmt.Sprintf(`SELECT * FROM "%s"."%s"`, schema, table)