pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: reina@nsi.edu
To: pgsql-admin@postgresql.org
Subject: Alias for field name
Date: 28 Feb 2002 16:22:56 -0800
Message-ID: <f40d3195.0202281622.5125b34c@posting.google.com> (raw)

I know this is probably a no-no, but I was just curious. 

I have two databases that are almost identical. Some of the minor
differences include different field names. For instance, in one db a
field called 'cell_name' is the same (more or less) as a field called
'file_name' in another db (actually cell_name is a subset of
file_name).

Would it be possible for PostgreSQL to know that if I ask for
'file_name' in the first db that I am really talking about
'cell_name'? In other words, is there an alias declaration?

e.g.    CREATE TABLE testtable (
		cell_name    int4  AKA file_name
	);

Note that I don't think this would be true referential integrity
because 'file_name' is nowhere in the first database (it's between
them).

Thanks.
-Tony



Message-ID: <f40d3195.0202281622.5125b34c@posting.google.com>
Permalink:  ../f40d3195.0202281622.5125b34c@posting.google.com/
Also on:    postgresql.org/message-id/f40d3195.0202281622.5125b34c@posting.google.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: reina@nsi.edu
  Subject: Re: Alias for field name
  In-Reply-To: <f40d3195.0202281622.5125b34c@posting.google.com>
  References: <f40d3195.0202281622.5125b34c@posting.google.com>

* 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