Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The temporary table doesn't create #6

Open
ShemTovYosef opened this issue Jan 23, 2018 · 3 comments
Open

The temporary table doesn't create #6

ShemTovYosef opened this issue Jan 23, 2018 · 3 comments

Comments

@ShemTovYosef
Copy link

Hi,

I tried with the sample attached in documentation but it doesn't work for me. The table didn't create.
PostgreSQL 9.5.5 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609, 64-bit

@hnsl
Copy link
Owner

hnsl commented Feb 14, 2018

Which error are you getting?

@jtara
Copy link

jtara commented May 15, 2018

I have the same issue. There is no error message. It simply does not create the table.

This is in PostgreSQL 10.3.

@jtara
Copy link

jtara commented May 15, 2018

Pilot error, sorry.

There was indeed an error message which wasn't terribly helpful.

I decided to actually try to example, which - of course - worked, and then worked through what might be wrong with my query.

My DB has upper/lower case columns (because I'm used to working with SQLite, which recognizes mixed-case, and didn't know better) and I think colpivot has some issues with this. It appears you do double-quote column names in SOME CASES, but not all, and doesn't seem to be possible to work-around by adding double-quotes in the input arguments.

I fixed by writing a SELECT to alias all of the columns in my input table to snake_case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants