6

I have the below query to convert geometry into GeoJSON format.

select ST_ASGEOJSON(POLYGON_GEOMETRY) from "POC"."POLYGON_PLN"; 

output:

{"type":"Polygon","coordinates":[[[10.3986007,47.95355213],[10.39885819,47.95386829],[10.39924443,47.95400241],[10.39955914,47.95422277],[10.39967358,47.95436647][10.3986007,47.95355213]]]}

The output is fine, But when I tried to copy the output within pgAdmin 4 (or) when I refer this output for some other thing, I am getting the quotations at beginning and end.

Please suggest a way to remove these quotations.

Rupesh
  • 63
  • 1
  • 5
  • I am using pgadmin4. Just copying the output and paste in some notepad file. – Rupesh Mar 19 '19 at 08:51
  • 1
    In pgadmin 3 in Options -> Query tool -> Results grid, you can configure that. So look for a similar option in pgadmin 4. – 404 Mar 19 '19 at 09:34

3 Answers3

10

In File->Preferences, navigate to "Query Tool"->"Results grid" change the "Result copy quoting" dropdown to None

Chris Amelinckx
  • 4,334
  • 2
  • 23
  • 21
4

You can configure the quote character used in copy-pasted results via the pgAdmin settings.

Open File->Preferences from the menu, then navigate to "Query Tool"->"Results grid", and change the "Result copy quote character" as needed.

Nick Barnes
  • 19,816
  • 3
  • 51
  • 63
1

In my case it was download data to CSV file so I need change in menu File-> Preferences then navigate to "Query Tool"-> "CSV/TXT Output" and change the "CSV quoting" to “None”.