Re: bytea or large object
От | Frank Joerdens |
---|---|
Тема | Re: bytea or large object |
Дата | |
Msg-id | 20020404123641.B30196@superfly.archi-me-des.de обсуждение исходный текст |
Ответ на | Re: bytea or large object (Frank Joerdens <frank@joerdens.de>) |
Список | pgsql-sql |
On Thu, Apr 04, 2002 at 11:40:51AM +0200, Frank Joerdens wrote: > On Wed, Apr 03, 2002 at 04:47:29PM +0200, Jean-Christophe FABRE wrote: > > > > Hi, > > > > I would like to store .pdf files in a database, which is accessed through a > > PHP interface. > > which is the best way to store binary data? > > - bytea? (with the tricky handling of escape chars) > > - large objects? > > I asked the same question a week ago on pgsql-general. Here's my 2 > cents: The Postgres large object interface is older and therefore more > tried and tested. It used to have a reputation for slowness, but the > code was overhauled in 7.1 to address this issue. The LO interface is a > little convoluted and takes some getting used to, but works well. For > Bytea you can use "normal" SQL syntax. Escaping the data is not > really difficult. I forgot: A distinct advantage of bytea over large objects is that you can still use pg_dumpall to back up your entire server in a single step. It doesn't work with large objects because pg_dumpall can't create binary output in an e.g. tar file. This means that if you use large objects, you have to back up your databases one by one, using a binary output format with pg_dump. Regards, Frank
В списке pgsql-sql по дате отправления: