Re: Table symbolic link

From: "Campbell, Lance" <lance(at)illinois(dot)edu>
To: "'Steve Crawford'" <scrawford(at)pinpointresearch(dot)com>, Joe Conway <mail(at)joeconway(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Table symbolic link
Date: 2016-05-18 14:41:03
Message-ID: B75CD08C73BD3543B97E4EF3964B7D70203958CA@CITESMBX1.ad.uillinois.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I did not even think about a table view. I use them very rarely. I also don’t do update, insert or delete on the view I have.

Thanks a lot. That was really helpful.

Lance

From: Steve Crawford [mailto:scrawford(at)pinpointresearch(dot)com]
Sent: Wednesday, May 18, 2016 9:40 AM
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Campbell, Lance <lance(at)illinois(dot)edu>; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Table symbolic link

As others mentioned, you can create a view. But depending on they types of updates you do, other views that already exist on that table, triggers, and the version of PostgreSQL among other issues it may not be a viable option.

Cheers,
Steve

On Wed, May 18, 2016 at 7:37 AM, Joe Conway <mail(at)joeconway(dot)com<mailto:mail(at)joeconway(dot)com>> wrote:
On 05/18/2016 10:31 AM, Campbell, Lance wrote:
> The better strategy would be to rename the table to the new name and add
> a symbolic table that link to the new table name. Then as I make
> changes to each application I can point them to the new name. Maybe in
> a year I could delete the symbolic table name.
>
> Is this possible? I have not seen a symbolic table name feature but I
> thought I would ask.

See CREATE VIEW:
http://www.postgresql.org/docs/9.5/interactive/sql-createview.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.postgresql.org_docs_9.5_interactive_sql-2Dcreateview.html&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mtJxlYxRVRzvxCd_4WVbFInP-UBNaQayeybi9fzuV1g&m=H0m6eO4nCSmV6BYWknQX8e7l391VlMeZBWqjdXVA6Tw&s=IWkisOX-I4ivF-ukJCUnEig7VM5CCrD1VK1aggilVsc&e=>

HTH,

Joe

--
Crunchy Data - http://crunchydata.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__crunchydata.com&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mtJxlYxRVRzvxCd_4WVbFInP-UBNaQayeybi9fzuV1g&m=H0m6eO4nCSmV6BYWknQX8e7l391VlMeZBWqjdXVA6Tw&s=vRBQgT2I4IgGKkagrJZrFBiJ9w9xC8WbwgRVW-XUfzg&e=>
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2016-05-18 14:57:44 Re: Table symbolic link
Previous Message Steve Crawford 2016-05-18 14:39:54 Re: Table symbolic link