Re: Same Table Name - 2 Owners

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
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


Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux