5

Using pgAdmin, how can I see the entire string value for a row when the value is very long?

For example, the value may be comma-separated values (CSV) content with hundreds or thousands of characters. Furthermore, the value may contain newline characters.

When doing queries in pgAdmin’s SQL tool, the results pane only shows a few dozen characters, and then suppresses the display of any more. Is there some way to see all of the text value?

Any way to export the results of a query to a text file or a text window perhaps?

8
  • Open pgAdminIII,

  • Select your database,

  • Use the Magnifying Glass button, i.e. "Execute arbitrary SQL queries"

  • Instead of running your query using the green triangle "Execute Query", choose the button two to the right of that - i.e. "Execute Query, write result to file".

  • Choose your destination, then you can view arbitrary length text in your chosen file destination.

  • You can also use psql which will show text, but will scroll if that's any use. Also, there would be the possibility of scripting your query output using different delimiters.

  • Thanks, that does work. Unfortunately, that feature seems to support only exporting as CSV. My stored value is already CSV text. That results in the quotes and such being doubled so as to escape them. So I cannot actually see my stored CSV in its original condition. – Basil Bourque Nov 19 '15 at 3:14
  • Can't you use pipe (|) as a separator and then use sed (or vi or whatever) to remove the pipes - you could script it so you wouldn't have to manually intervene. – Vérace Nov 19 '15 at 3:20
  • Check here - a couple of methods to deal with this problem. And this might also be of interest. Ringer is on the PostgreSQL team and also contributes here. – Vérace Nov 19 '15 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.