Skip site navigation (1) Skip section navigation (2)

Re: Permanent alias for postgresql table

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Permanent alias for postgresql table
Date: 2009-03-12 13:55:57
Message-ID: gpb49e$r7c$1@ger.gmane.org (view raw or flat)
Thread:
Lists: pgsql-sql
Marco Lechner, 12.03.2009 13:59:
> Hi list,
> 
> I'm searching for a way to create permanent alias for
> tablenames in postgresql. We are storing various versions
> of a routable network in postgresql (postgis, pgrouting)
> and access a certain version with a bunch of php-skripts.
> We like to use aliases for the "currently used tables" oo
> be able to relink the current tables rapidly by changing
> the alias target.
> 
> Any idea - or is this approach nonsense?

A view? 

CREATE VIEW constant_table_name
AS 
SELECT *
FROM current_table

Thomas


In response to

pgsql-sql by date

Next:From: Marco LechnerDate: 2009-03-12 14:26:47
Subject: Re: Permanent alias for postgresql table
Previous:From: Marco LechnerDate: 2009-03-12 12:59:09
Subject: Permanent alias for postgresql table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group