From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: Information about the command SQL " create synonym".
Date: Thu, 3 Feb 2005 21:04:18 +0100
Message-ID: <20050203210418.E612@hermes.hilbert.loc> (raw)
In-Reply-To: <eab2c4b905020311486339dba4@mail.gmail.com>
References: <OF8674EB86.0DA51E38-ONC1256F2B.0030BC4B@frmy.bull.fr>
<eab2c4b905020311486339dba4@mail.gmail.com>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: Karsten.Hilbert@gmx.net
Subject: Re: Information about the command SQL " create synonym".
In-Reply-To: <20050203210418.E612@hermes.hilbert.loc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox