What I'm mostly doing these days is converting an Oracle SQL database into a PostgreSQL (9.1.6) database.
The most common issues that I tend to come across are as follows:
1. decode --> case when
2. nvl --> coalesce
3. (+) --> outer join
4. connect by prior --> connectby function with tablefunc contrib module.
5. merge into --> ???
etc...
I am currently skimming through the PostgreSQL manual and funnily enough there seems to be no MERGE INTO statement (or any direct substitutions for it).
I am aware that PL/pgSQL could be used as an alternative but that would mean a lot of extra workload for me. Is there something that I'm missing about this?
connect by--> recursive common table expression: postgresql.org/docs/current/static/queries-with.htmlMERGE INTOdoes, and how the OP wants to use it, making it hard to come up with a meaningful answer.