Search code examples
pgadminpgadmin-4

How to copy data from pgAdmin without double quotes around the values


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.


Solution

  • 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.