Re: Oracle to Postgres migration

From: Ilya Kosmodemiansky <ik(at)dataegret(dot)com>
To: bimal maity <bimal(dot)af2020(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Oracle to Postgres migration
Date: 2023-12-22 09:49:42
Message-ID: CAG95seUMaWTJJ=f27B-1rp4rE9wnTMJvcQ1--fW-G8cWX7jo8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Bimal,

On Fri, Dec 22, 2023 at 10:28 AM bimal maity <bimal(dot)af2020(at)gmail(dot)com> wrote:
> I have below query used in Oracle but while migrating to Postgres this code is not supported in Postgres.

I didn't try your query, but I guess it complains about RTRIM, because
it should accept text as an argument. If it is a case, you can try to dig in
direction of something like this:

> SELECT p.id_po, p.line_number, replace(replace(replace(RTRIM(XMLAGG(XMLELEMENT(name C, regexp_replace(p.protocol_number,'([[:cntrl:]])','', 'g'))ORDER BY 1)::text

(with explicit type casting)

best regards,
Ilya

--
Ilya Kosmodemiansky
CEO, Founder

Data Egret GmbH
Your remote PostgreSQL DBA team
T.: +49 6821 919 3297
ik(at)dataegret(dot)com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message tayyab.humayl 2023-12-22 11:20:32 RE: Error: Package: postgresql13-devel-13.13-1PGDG.rhel7.x86_64
Previous Message Krishna B 2023-12-22 03:45:45 Re: Login script