Using meta-data for foreign key?

From: Mike Blackwell <maiku41(at)sbcglobal(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Using meta-data for foreign key?
Date: 2008-04-17 15:23:10
Message-ID: 48076B5E.4050707@sbcglobal.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an existing table in an app, along the lines of:

CREATE TABLE foo (
name text,
address text,
some_numeric_info integer,
<a bunch of additional fields here>
);

I now need to be able to associate additional information (e.g. printing
order) with each field. Is it a bad idea to use the (fully qualified)
field name as a foreign key to link back to the table meta-data? Is
there a better way?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Gagnon 2008-04-17 15:25:16 Re: Unable to add a new column to a table named "in" (look like a bug ...)
Previous Message David Gagnon 2008-04-17 15:17:17 Re: Unable to add a new column to a table named "in" (look like a bug ...)