Unix Technical Forum

Referencing

This is a discussion on Referencing within the pgsql Sql forums, part of the PostgreSQL category; --> Hi. Is there a way to references dynamic tables? I.E: I have a table called "buy" that create some ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Sql

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 12:54 PM
lucas@presserv.org
 
Posts: n/a
Default Referencing

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.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:28 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com