At 15:35 30/06/00 +0200, Guillaume Perréal wrote: 

<excerpt><excerpt>>>>>

</excerpt></excerpt><excerpt><excerpt>1. add fieldname to the definition of station, then use 

FOREIGN KEY ("fieldname", "type") references "information" (fieldName,
code),

</excerpt>Well, I don't think adding the same value to each row of
"station" is the better solution. But it's a solution.

</excerpt><<<<<<<<


I agree. 



<excerpt><excerpt>>>></excerpt></excerpt><excerpt><excerpt>  


FOREIGN KEY ( "type") references "station_fields" ( code),

</excerpt>I tried : it doesn't work. It seems that view rows don't have OID, which are used in foreign key. (I deduce that from the error messages I've got  when I tried). 

<excerpt>

</excerpt></excerpt><<<<<<<<


Sorry, I assumed if I could define it (under 7.0.2), then it would work. But, as you say, it dies when you do an insert. 


The only other alternative is to create a real table instead of a view (ie. break 'information' into multiple tables). Or just do what you have been doing...





----------------------------------------------------------------

Philip Warner                    |     __---_____

Albatross Consulting Pty. Ltd.   |----/       -  \

(A.C.N. 008 659 498)             |          /(@)   ______---_

Tel: (+61) 0500 83 82 81         |                 _________  \

Fax: (+61) 0500 83 82 82         |                 ___________ |

Http://www.rhyme.com.au          |                /           \|

                                 |    --________--

PGP key available upon request,  |  /

and from pgp5.ai.mit.edu:11371   |/

