What is the equivalent for sql loader in postgresql? - postgresql

What is the equivalent for sqlldr(used for oracle) in postgresql?
I am trying to find equivalent for sql loader utility(sqlldr) in postgres.

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/

Related

Is it possible to sync a Pervasive SQL database to a PostgreSQL database, and vice-versa

I'm trying to do automatic data synchronization between pervasive SQL and PostgreSQL which means whenever I save the data in the pervasive Sql database it would automatically sync to the PostgreSQL database at a specific period. Is there any tool available for this or any other we can achieve it?
I searched more on the internet but no solution was found.

Can postgresql stored procedures operate on a separate database?

Can postgresql (specifically 9.6) stored procedures read/modify a separate database, or can they only operate on data within the local database where they are defined?
Postgres 9.6 does not have stored procedures, which were introduced with Postgres 11.
You probably mean Postgres functions, which have been there since time immemorial. It's a widespread misconception to call those "stored procedures".
Both are confined to the database in which they are executed - as Postgres will tell you if you try to prefix a database name to an object name:
ERROR: cross-database references are not implemented:
Unless you use the Foreign Data Wrapper infrastructure (you probably want the additional module postgres_fdw with that) or dblink, which allow exactly that after all ...
How to use (install) dblink in PostgreSQL?
Persistent inserts in a UDF even if the function aborts
How do I do large non-blocking updates in PostgreSQL?

DBLINK vs Postgres_FDW, which one may provide better performance?

I have a use case to distribute data across many databases on many servers, all in postgres tables.
From any given server/db, I may need to query another server/db.
The queries are quite basic, standard selects with where clauses on standard fields.
I have currently implemented postgres_FDW, (I'm, using postgres 9.5), but I think the queries are not using indexes on the remote db.
For this use case (a random node may query N other nodes), which is likely my best performance choice based on how each underlying engine actually executes?
The Postgres foreign data wrapper (postgres_FDW) is newer to
PostgreSQL so it tends to be the recommended method. While the
functionality in the dblink extension is similar to that in the
foreign data wrapper, the Postgres foreign data wrapper is more SQL
standard compliant and can provide improved performance over dblink
connections.
Read this article for more detailed info: Cross Database queryng
My solution was simple: I upgraded to Postgres 10, and it appears to push where clauses down to the remote server.

Migrating to a Nosql DB from Oracle

I have a large code base of an online charging application that is tightly coupled to Oracle and relies extensively on SQL queries , PL/SQL procedures etc.
In case , we are to migrate to a NO SQL based DB , would all the code need to be rewritten or are there some already available libraries/drivers that do the job of translation of sql queries to no-sql queries automatically by simply having us define a mapping between the current Oracle Schema and the new underlying NO-SQL DB schema (designed afresh)?
Thanks
You are going to rewrite a lot of things.
Relational database and nosql "things" are so different. And nosql are not transactional, eccept for documents.
You can save money going to mysql or postgresql (suggested) but still you have to implement a lot of things and you need to study proxy, connection pooling when you need to scale.
But, you can save a lot of work with Postgres plus advanced server of enterprise db: http://www.enterprisedb.com/products-services-training/products/postgres-plus-advanced-server
They say you can switch db without a single line to be changed. And save money.
Then you can access things like partitioning that will cost a lot in enterprise version of Oracle.

is there any PostgreSQL loader like Oracle has?

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?
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.