[GENERAL] Lost in Foreign Key land

2005-04-09 Thread Benjamin Smith
Ok, I have a stupid-simple table: create table files ( id serial unique not null, mime varchar not null, name varchar not null ); Idea being that I can save values from a file upload into a table, and use throughout my application. This gives me a central repository to look for files of

Re: [GENERAL] Lost in Foreign Key land

2005-04-10 Thread Thomas F.O'Connell
This is only a soft answer. A real answer would probably involve mucking with the system tables, so maybe a question about the application logic can prevent you from resorting to that. Through what process does a file get orphaned? Is it possible that you could just cascade deletes on the column

Re: [GENERAL] Lost in Foreign Key land

2005-04-10 Thread David Fetter
On Sat, Apr 09, 2005 at 03:41:55PM -0700, Benjamin Smith wrote: > Ok, I have a stupid-simple table: > create table files ( > id serial unique not null, > mime varchar not null, > name varchar not null > ); BTW, the hip kids use TEXT instead of VARCHAR :) > Idea being that I can save valu