error inserting big files in DB.

Поиск
Список
Период
Сортировка
От Marlos Corrêa
Тема error inserting big files in DB.
Дата
Msg-id c3001433050815081875e06346@mail.gmail.com
обсуждение исходный текст
Ответы Re: error inserting big files in DB.  (Richard Huxton <dev@archonet.com>)
Re: error inserting big files in DB.  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
Hi, Folks.

I've a problem so i can use some help.
I've trying to put a 5 MB file in my database, but i got an error.
Anyone knows if  "lo_import" or "lo" (type of bytea) has a limit of
data transferred in one operation?
Some people tell me that i can't transferr more than 1 MB a time to
Postgresql, so i need to
divide my file in many small pices, than upload they one at time, and
finally, use some workaround in DB to restore my original file. Is
this correct?
Below is a piece of code that i use:

$conteudo=addslashes(fread(fopen($arq, "r"), filesize($arq)));
$sql="insert into arquivos (nome, tipo, tamanho, dados) values
('$arq_name', '$arq_type', '$arq_size', lo_import('" .
addslashes($arq) . "'));";

I would be pleased if anyone could help me.
Thanx in advance.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tony Caduto
Дата:
Сообщение: Re: Question about the NAME type used in pg_proc and pg_class
Следующее
От: "WELTY, RICHARD"
Дата:
Сообщение: Re: Postgresql Books: Which one ?