From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Marlos Corrêa <listastec(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: error inserting big files in DB. |
Date: | 2005-08-15 18:06:08 |
Message-ID: | 4300D990.1060008@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Marlos Corrêa wrote:
> 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) . "'));";
>
It sounds to me, with limited information that you need to edit your
php.ini to allow uploads of greater than 5MB. The actual limit of a
large object is 1 Gigbyte I believe.
Sincerely,
Joshua D. Drake
> I would be pleased if anyone could help me.
> Thanx in advance.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Lazar | 2005-08-15 18:15:19 | Encoding and Conversion Question(s) |
Previous Message | Oluwatope Akinniyi | 2005-08-15 17:58:14 | Re: ~/pgpass |