Re: Information about the command SQL " create synonym". - Mailing list pgsql-sql

From Karsten Hilbert
Subject Re: Information about the command SQL " create synonym".
Date
Msg-id 20050203210418.E612@hermes.hilbert.loc
Whole thread Raw
In response to Re: Information about the command SQL " create synonym".  (Philip Patterson <philip.patterson@gmail.com>)
List pgsql-sql
> Much like yourself, I have been searching for a way to create synonyms
> in Postgres.   I think that I have found a hack / solution to our
> problem.
...
> What I did, was to make use of the Postgres inheritance feature.

> This in turn effectively creates an alias:

> CREATE TABLE foo (bar int not null);
> 
> but you need a synonym called "gerald", then you could do the following ...
> 
> CREATE TABLE gerald () INHERITS (foo);

> I would love to hear from the developers, or other gurus, if there are
> any serious issues with doing this.
Primary keys and foreign keys will likely show unexpected
behaviour (as in being out of sync between foo and gerald and
any other "alias" child tables of foo).

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


pgsql-sql by date:

Previous
From: Jeff Boes
Date:
Subject: Re: Calendar Function
Next
From: Bradley Miller
Date:
Subject: pg_restore problem -- MORE?!?