I'm new to pgAdmin4 and performing tests before jumping in the deep end.

I've uploaded a large dataset into a the public schema within a database named 'spatial_db'. Rather than re-uploading the data to a new database through the DB Manager in QGIS, is there a way to transfer the spatial data in the public schema of the new database as shown below?

I'm conscious that moving the table alone, will only bring the attribute table across but perhaps I have this wrong, will it will bring the geometry across too?

enter image description here

  • 2
    Just a note; don't confuse what a database client is: an UI to access the database server. QGIS' DB Manager is one, as is pgAdmin. Moving data between databases has nothing to do with the client per se (I know QGIS offers Drag'n'Drop functionality, but behind the scenes it really executes a bunch of standard SQL statements). Usually, the safest way (keeping any relational structure of the source DB intact) for inter-DB transfers is to create a dump (pg_dump[all]) and restore it. For data-only transfers, there are plenty of more or less fit options, e.g. db_link, CSV export...
    – geozelot
    Oct 8, 2019 at 10:16

1 Answer 1


A SQL query will do the trick, I think?

    SET SCHEMA new_schema

In my opinion, the spatial_ref_sys table must remain in the public schema.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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