darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
1.02k stars 343 forks source link

Oracle aggregate function LISTAGG not translated #425

Closed edelanoe closed 7 years ago

edelanoe commented 7 years ago

The Oracle keyword "listagg" is not translated, although the PostgreSQL documentation makes some kind of promises about a very similar syntax. Actually, I see that the Oracle-like syntax of "string_agg" is not well working: it doesn't work with "WITHIN GROUP" clause. Could ora2pg help doing the job ?

An example is provided in the attachment. Best Rgds, Eric Listagg_T_VAT_RATE.txt

slardiere commented 7 years ago

You could use the PostgreSQL extension Orafce , which provide listagg

darold commented 7 years ago

As Sebastien says, Orafce, thanks to Pavel, provide lot of Oracle functions that can be used without manual rewrite, this is especially useful when Ora2Pg fails at automatic rewriting. Here it seems that it could be done automatically but I've not already taken the time to work on it. I keep this issue open as a reminder.

darold commented 7 years ago

Commit d847810 adds this translation.