public inbox for [email protected]
help / color / mirror / Atom feedFrom: Holger Jakobs <[email protected]>
To: [email protected]
Subject: Re: Same Table Name - 2 Owners
Date: Sat, 5 Oct 2024 00:21:27 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAN6TVj=TV0jpSN_zJ7uHZr+JQ=N8j8vRduxSNRdxepfDizncpw@mail.gmail.com>
References: <CAN6TVj=TV0jpSN_zJ7uHZr+JQ=N8j8vRduxSNRdxepfDizncpw@mail.gmail.com>
Am 05.10.24 um 00:09 schrieb Sam Stearns:
> Howdy,
>
> In Oracle, I have a table name that is the same name between 2
> different owners but completely different DDL:
>
>
> /SQL> select owner, object_name, object_type from dba_objects where
> object_name = 'SUBSCRIPTIONS' and object_type = 'TABLE';
>
> OWNER OBJECT_NAME OBJECT_TYPE
> ---------- -------------------- -----------------------
> INTERFACE SUBSCRIPTIONS TABLE
> ORACLE SUBSCRIPTIONS TABLE
>
> SQL>/
>
>
> Is it possible to do this in Postgres?
>
> --
>
> *Samuel Stearns*
> Lead Database Administrator
> *c:* 971 762 6879 | *o:* 503 672 5115 | DAT.com
>
> DAT
> <https://www.dat.com/?utm_medium=email&utm_source=DAT_email_signature_link;
In Oracle, owner is synonomous with a schema, they are coupled 1:1. So
don't be fooled, the two tables are in two different schemas.
If you want to do this in PostgreSQL, just create two schemas and put
two tables with the same name (but different properties) into each of
them, respectively.
In PostgreSQL, users (actually login roles) and schemas aren't tied to
each other. You are free to name them as you wish.
Regards,
Holger
Attachments:
[application/pgp-signature] OpenPGP_signature (203B, 3-OpenPGP_signature)
download
view thread (6+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Same Table Name - 2 Owners
In-Reply-To: <[email protected]>
* 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