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

Postgres service stops while running pivotmytable #7

Open shankarnayagam opened 7 years ago

shankarnayagam commented 7 years ago

Hi,

I have been using this script for quite a while without any issue. But suddenly this script stopped working and whenever I run this select * from pivotmytable query my postgreSQL database service stops and I am not able create the pivot table. My original table almost has 1 million records, could this be the reason for this issue? Kindly confirm.

shankarnayagam commented 7 years ago

I found out the issue. If any of values of the column on which we are executing the pivot is null, it is crashing the database, rather it would be better if it throws an error message saying cannot create column name as null.

jtornero commented 7 years ago

@shankarnayagam Thank you for reporting the issue. I hope I could find some time to fix it in the future.