11/18/2023 0 Comments Sqlite vs postgresql![]() To prove the concept I dumped this testdb and imported into a development environment on a production server and the data transferred over nicely. ![]() I know if I had tried to run one of these scripts or do the stepwise conversion mentioned herein, I would have spent much more time. I then created a testdb with createdb:Īfter some queries to check the data, it appears it worked quite well. Set work_mem to '16MB', maintenance_work_mem to '512 MB' With include drop, create tables, create indexes, reset sequences ![]() I installed from the *.deb and created a command file like this in a test directory: load database You can convert the flat SQLite file into a usable PostgreSQL database. Pretty cool application and it's relatively easy to use. I looked up the wiki docs:Īnd discovered pgloader. I started looking into the solutions here and realized that I was looking for a more automated method. Even though this post has an accepted answer (and a good one at that +1), I think adding this is important. I came across this post when searching for a way to convert an SQLite dump to PostgreSQL. Importing a big pile of data through SQL INSERTs might take a while but it'll work. The syntax in the SQLite dump file appears to be mostly compatible with PostgreSQL so you can patch a few things and feed it to psql. ![]() While SQLite defaults null values to '', PostgreSQL requires them to be set as NULL. You should be able to feed that dump file straight into psql: /path/to/psql -d database -U username -W 0) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |