Export query from postgresql to csv
Example from: Stackoverflow import sys #set up psycopg2 environment import psycopg2 #driving_distance module #note the lack of trailing semi-colon in the query string, as per the Postgres documentation query = “”” select * from driving_distance ($$ select gid as id, start_id::int4 as source, end_id::int4 as target, shape_leng::double precision as cost from network $$, %s, %s, … Leggi tutto