From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | pgsql general list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Large Objects |
Date: | 2005-01-02 16:38:24 |
Message-ID: | 20050102173824.C566@hermes.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> > >BYTEA is not always pragmatic. What is the file is 100 megs? 256 megs?
> > What is the size when bytea become inafective ?
> I don't think it's so much a matter of effectiveness, it makes no
> difference at all in storage space.
Ah, thanks, good to know. Something new to learn every day...
> The issue is that if you store it
> in a field, accessing it becomes an all or nothing affair, which means
> if it's a 100Mb object, it's all going to be accessed whenever you ask
> for it.
At least for reads you are wrong. You can use substring() on
bytea quite nicely. Remember, however, that that operates on
*bytes*, not characters. Also be careful about encodings being
set for the connection. At least with PostgreSQL < 7.4 we found
we had to "reset client_encoding" despite the docs saying
encodings won't affect bytea field reads.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
From | Date | Subject | |
---|---|---|---|
Next Message | John Sidney-Woollett | 2005-01-02 17:22:44 | Re: |
Previous Message | Andreas Kretschmer | 2005-01-02 16:06:44 | Re: Shared Sequences? |