jtornero / pivotmytable

PivotMyTable is a PL/Python PosgreSQL function for easy construction of pivot tables, generating the proper code for the crosstab functions from the PostgreSQL extension tablefunc to work.
GNU General Public License v3.0
16 stars 9 forks source link

Allow materialized views as input table to pivot. #4

Closed JohnDeGitt closed 9 years ago

JohnDeGitt commented 9 years ago

Pivotmytable function uses 'information_schema' as source to get details about tables and columns but this schema doesn't contain information about materialized views. One should use Postgresql specific catalog tables (e.g. pg_attribute) which are source of information on all relations (tables, views, materialized views, etc...). The SQL script can be modified according to Erwin Brandstetter advices as described on http://stackoverflow.com/questions/19127561/how-to-introspect-materialized-views.

JohnDeGitt commented 9 years ago

I can push fixes I have made, into new branch but the owner of the project should give me rights to create one. If this isn't acceptable I can paste e.g. 'git format-patch' output here.

jtornero commented 9 years ago

@JohnDeGitt

Thank you for your interest, and sorry for the long delay for answering you.

You should fork the repository and subsequently make a pull request.

All the best

Jorge