Mimic ALIAS in Postgresql? - Mailing list pgsql-general

From Ron Johnson
Subject Mimic ALIAS in Postgresql?
Date
Msg-id CANzqJaCc5jVh3J3EA0j4Dz7V2HsrcR9eE0AE45pt-PmMrjhdmg@mail.gmail.com
Whole thread Raw
Responses Re: Mimic ALIAS in Postgresql?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Mimic ALIAS in Postgresql?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Mimic ALIAS in Postgresql?  (Jim Nasby <jim.nasby@gmail.com>)
Re: Mimic ALIAS in Postgresql?  (hector vass <hector.vass@gmail.com>)
Re: Mimic ALIAS in Postgresql?  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
Some RDBMSs have CREATE ALIAS, which allows you to refer to a table by a different name (while also referring to it by the original name).

We have an application running on DB2/UDB which (for reasons wholly unknown to me, and probably also to the current developer) extensively uses this with two schemas: MTUSER and MTQRY.  For example, sometimes refer to MTUSER.sometable and other times refer to it as MYQRY.sometable.

My goal is to present a way to migrate from UDB to PG with as few application changes as possible.  Thus, the need to mimic aliases.

Maybe updatable views?
CREATE VIEW mtqry.sometable AS SELECT * FROM mtuser.sometable;

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Moving to Postgresql database
Next
From: Dominique Devienne
Date:
Subject: Re: Moving to Postgresql database