Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgadmin4 - Download Query result as CSV

Tags:

pgadmin-4

I wrote a query using the query tool in pgadmin 4. Now I want to download the results as a csv. I´ve got two problems with that.

  1. The 'Download as CSV'-button does not work sometimes. Especially when the result contains 1000+ rows.

  2. When I finally have a csv and I want to open it, this message is all I see:

    "'ascii' codec can't encode character u'\xbb' in position 26: ordinal not in range(128)"

Since I´m fairly new to all of this, could someone enlighten me to what is wrong?

like image 828
StackAsk Avatar asked Jun 01 '17 11:06

StackAsk


1 Answers

On your questions:

  1. The broken CSV download was a known bug that was fixed in pgAdmin v1.5 (Bug summary at the login-required https://redmine.postgresql.org/issues/2253; the gist is that there were multiple issues with exporting JSON data and Unicode). If you're not on that version, try updating and see whether you continue to have the issue.
  2. You didn't specify where you're seeing that message regarding encoding, but the character referenced in the error is a "Right-Pointing Double Angle Quotation Mark" (») (http://www.codetable.net/hex/bb).
like image 117
anthonydb Avatar answered Nov 12 '22 08:11

anthonydb