Hi there,
I've been reading documentation and manuals and things and haven't been
able to find a discussion of this in a clear manner. (If anyone can
point me to a reference I've missed I'd be grateful.)
Here are some questions I have:
Can I put an arbitrary binary file in a bytea field?
And should I?
Is this the best way to store arbitrary binaries?
My motivating example: I have a largish table, with potentially tens of
thousands of rows. Each one has some simple numeric or text data, and
an OPTIONAL associated binary archive (.tar.gz) containing truly
arbitrary types of files. Sometimes a set of images in one format,
sometimes a single image in another format, sometimes a proprietary
file produced by certain lab equipment - and who knows where it might
go.
So I thought maybe it would make retrievals slow if I packed the
binaries in there. Or is that only if I'm lazy and "select * from
table"? 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 archive.
Is there a recommended way?
Is there something else I should try?
thanks for any feedback,
Cath
Cath Lawrence, Cath.Lawrence@anu.edu.au
Senior Scientific Programmer, Centre for Bioinformation Science,
John Curtin School of Medical Research (room 4088)
Australian National University, Canberra ACT 0200
ph: (02) 61257959 mobile: 0421-902694 fax: (02) 61252595