On Wednesday, July 30, 2003, at 12:14 AM, Cath Lawrence wrote:
> OK, a followup to my question now before anyone replies...
> On Wednesday, July 30, 2003, at 04:01 PM, Cath Lawrence wrote:
>> Perhaps I should make a special archive table and refer to it by some
>> key. Say, id, [array of archive content file names], bytea for the
> Actually this now strikes me as a bad idea, since I think I can't
> search my table by filename to find what archive it's in, and retrieve
> that archive. With a plaintext list I could do
> "select archive from bin_archives where file_name_list like
> Or am I being clueless about arrays, too?
This sounds like you want to have a one-to-many relationship between
your record and its associated files. What you need to do is create a
separate table that will reference your record id:
CREATE TABLE associated_files (
fileid serial PRIMARY KEY,
recordid int REFERENCES master_records (id),
filepath text NOT NULL
Does that help?
In response to
pgsql-novice by date
|Next:||From: Lynna Landstreet||Date: 2003-07-30 23:03:18|
|Subject: pg_atoi error?|
|Previous:||From: Miernik||Date: 2003-07-30 17:59:07|
|Subject: Re: ALTER TABLE DROP COLUMN|