Referencing

From: lucas(at)presserv(dot)org
To: pgsql-sql(at)postgresql(dot)org
Subject: Referencing
Date: 2005-10-27 20:24:52
Message-ID: 20051027172452.zdz9bjn9bd440ogk@www.presserv.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi.
Is there a way to references dynamic tables? I.E:
I have a table called "buy" that create some records in "financial" table, but
there is other table called "send" that create other records in "financial".
"Financial" table have the moneys' movements and needs to be referenciable by
"buy or send". IE:
create table buy (
id serial primary key,
product_id integer,--references....
value money
);
create table send (
id serial primary key,
product_id integer, --references...
value money
);
create table financial(
id serial primary key,
cred_deb smallint,
value money,
references integer, --<<-HERE IS THE PROBLEM, it will reference to buy OR send
table
);
Well, I dont know if I was clean.
Thank you.

Browse pgsql-sql by date

  From Date Subject
Next Message boinger 2005-10-27 21:46:43 Re: combining records from a single table and presenting them as one record
Previous Message MaXX 2005-10-27 20:07:09 Re: Merging lines with NULLs (with example data)