ms2.spectradata wnels2  2009-04-27 09:29
Status: Closed
 
I'm moving a database to another server and need to reload the ms2.spectradata table separately. I can't drop the table because of a dependency. I'm assuming there is a foreign key constraint somewhere but I have not been able to find it in any of the create table scripts when browsing with the pgAdminII tool. Can you tell me how to locate the dependency?

Thanks,
Bill
 
 
jeckels responded:  2009-04-27 09:37
Hi Bill,

I'm not sure what the query would be to ask for references to the table in Postgres, but I did a quick search for "spectradata" in the MS2 module's *.sql files.

The likely reference is the ms2.Spectra views defined in ms2-create.sql:

CREATE VIEW ms2.Spectra AS
    SELECT f.Run AS Run, sd.*
    FROM ms2.SpectraData sd INNER JOIN
        ms2.Fractions f ON sd.Fraction = f.Fraction;

Thanks,
Josh
 
wnels2 responded:  2009-04-27 11:06
Thanks for the quick response. It was in the views, cabig.spectra as well. Running a script through psql did not give the dependency tracing information in the error message. If I execute the drop command manually it gives me the rest of the story.

Bill