Halaman

Sabtu, 12 Februari 2011

Importing SQL Script file into Postgresql table

To import a table from sql script file do this:
1. Generate a sql script file.
We could have a sql script file from many tools.

2. Run the script and specify parameter for user, database, and the sql script file, e.g:
C:\TEST>psql -Uferrari -d mydb -f cmd.sql

If the size of cmd.sql is small, we could use pgAdmin tools. If it was a large file, it will take longer to process e.g: while inserting into table. or an error will raise with ERROR: out of memory; SQL state: 53200; Detail: Failed on request of size 1048576.

Tidak ada komentar:

Posting Komentar