agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFrom: Wetmore, Matthew (CTR) <Matthew.Wetmore@express-scripts.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: Kalyani Maity <bimal.af2020@gmail.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Oracle to Postgres Migration
Date: Thu, 1 Feb 2024 15:52:04 +0000
Message-ID: <b697e091f9a44a8ba330c56644e6e9af@express-scripts.com> (raw)
In-Reply-To: <e6740c8dd34034502736c48a8e35c14e9975054b.camel@cybertec.at>
References: <CACr=-MX6YEuL2M0hXwr-SoLx1aTpfFmsY0bguQLA11P18RBojQ@mail.gmail.com>
<e6740c8dd34034502736c48a8e35c14e9975054b.camel@cybertec.at>
I disagree a little with this. Setting search_path to fix non schema qualified SQL, is not a Best Practice.
You CAN do this and it will work, but it CAN cause trouble if your database has things of the same name. (again a not Best Practice).
My personal opinion on this, is to correct your SQL to include the schema qualified syntax (schema.whatever.) This way you are always 100% sure of what you are doing.
Just my $0.02
-----Original Message-----
From: Laurenz Albe <laurenz.albe@cybertec.at>
Sent: Thursday, February 1, 2024 4:38 AM
To: Kalyani Maity <bimal.af2020@gmail.com>; pgsql-admin@lists.postgresql.org
Subject: [EXTERNAL] Re: Oracle to Postgres Migration
On Thu, 2024-02-01 at 16:20 +0530, Kalyani Maity wrote:
> I have one scenario where one synonym created as below in oracle DB:
>
> create synonym 'schema1.procedure1' for 'schema2.procedure1'
>
> procedure1 only exist in schema2.
>
> I have migrated both schema 1 and schema 2 in postgres.
>
> How to create this synonym in postgres.
You don't. Instead, you set "search_path" to include both schemas.
Yours,
Laurenz Albe
view thread (30+ messages) latest in thread
Message-ID: <b697e091f9a44a8ba330c56644e6e9af@express-scripts.com>
Permalink: ../b697e091f9a44a8ba330c56644e6e9af@express-scripts.com/
Also on: postgresql.org/message-id/b697e091f9a44a8ba330c56644e6e9af@express-scripts.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Matthew.Wetmore@express-scripts.com, laurenz.albe@cybertec.at, bimal.af2020@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Oracle to Postgres Migration
In-Reply-To: <b697e091f9a44a8ba330c56644e6e9af@express-scripts.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox