pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: lucas@presserv.org
To: pgsql-sql@postgresql.org
Subject: Referencing
Date: Thu, 27 Oct 2005 17:24:52 -0300
Message-ID: <20051027172452.zdz9bjn9bd440ogk@www.presserv.org> (raw)

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.



view thread (7+ messages)  latest in thread

Message-ID: <20051027172452.zdz9bjn9bd440ogk@www.presserv.org>
Permalink:  ../20051027172452.zdz9bjn9bd440ogk@www.presserv.org/
Also on:    postgresql.org/message-id/20051027172452.zdz9bjn9bd440ogk@www.presserv.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lucas@presserv.org
  Subject: Re: Referencing
  In-Reply-To: <20051027172452.zdz9bjn9bd440ogk@www.presserv.org>

* 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