Skip site navigation (1) Skip section navigation (2)

CHILD WITHOUT PARENT (TEMPORARILY)

From: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: CHILD WITHOUT PARENT (TEMPORARILY)
Date: 2009-12-28 22:58:59
Message-ID: f03943a00912281458gddd4869p2118940b2d9b639f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
I am developing an app in which there are 2 tables: a parent and a child.
The difference is that, in my case, the child table is generated first and,
if the user decides to keep the information then a record is generated in
the parent table and the child table is connected to its parent. The field
in the child table that connects to its parent is temporarily filled with a
value of -1. The user who types the information may decide to keep or not
the records in the child table and it is at this time when a record in the
parent table is generated or not. Meanwhile, the records in the child table
have a tamporary value of -1 in the field that will connect to its parent
table and this causes me not to be able to define a foreign key.
Please advice.

Respectfully,
Jorge Maldonado

Responses

pgsql-novice by date

Next:From: Richard BroersmaDate: 2009-12-28 23:05:28
Subject: Re: CHILD WITHOUT PARENT (TEMPORARILY)
Previous:From: Bob McConnellDate: 2009-12-27 22:35:31
Subject: Re: indexes and relationships

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group