Re: Information about the command SQL " create synonym".

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Information about the command SQL " create synonym".
Date: 2005-02-03 20:04:18
Message-ID: 20050203210418.E612@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bradley Miller 2005-02-03 22:00:42 pg_restore problem -- MORE?!?
Previous Message Joel Fradkin 2005-02-03 19:58:29 Re: problem with backup and restore (probaly stupit newb thing)