how to use copy statement in postgresql to load data from a text file where the file has an escape character as a delimiter into a postgresql table?
Is there any otherway of loading data from textfile into a PostgreSQL table?
PostgreSQL is by no means a drop-in replacement for Oracle's database, but a developer or DBA that is familiar with Oracle will find PostgreSQL similar.
Overall, PostgreSQL and Oracle are evenly matched in their capabilities, performance, and compatibility. Oracle takes the lead on security, replication, and availability, while PostgreSQL has stronger API compatibility, cheaper support and more robust scalability.
Functionality – Oracle wins It not only provides more transactions per second than PostgreSQL, but also arguably provides higher levels of security.
PostgreSQL's PL/pgSQL language is similar to Oracle's PL/SQL language in many aspects.
pg loader emulates oracles sql loader:
http://pgfoundry.org/projects/pgloader/
pg bulkload is used to load lots of data in an otherwise offline db. Useful for large data warehouses, fast, and somewhat dangerous and quirky:
http://pgbulkload.projects.postgresql.org/
You should use COPY with the DELIMITER 'xx'
option. You probably need to play around a little bit to get it right, but the docs give a pretty good information about what to do with each option available to the command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With