how to import data from postgres database to android sqlite
I have a Postgres database server and I need to download the table records from postgres to tablet android (sqlite database). Is there a feature in Android to do this?
Example: There is a customer table in postgres and i need to import this table to sqlite in android.
Any tips are welcome.
This can be done by dumbing database in sql file from postgres and importing it to sqlite.
Dump database in a sql file.
pg_dump dbname > outfile.sql
Import database from sql dump file
sqlite> .read outfile.sql
You can dump specific table in postgres using following command:
pg_dump --table=table dbname > outfile.sql
Answered By – varnothing