Re: Storing files in postgres db

Поиск
Список
Период
Сортировка
От MaXX
Тема Re: Storing files in postgres db
Дата
Msg-id 20061204143648.70df69d7.bs139412@skynet.be
обсуждение исходный текст
Ответ на Storing files in postgres db  ("tam wei" <twxtam@gmail.com>)
Список pgsql-general
On Mon, 4 Dec 2006 00:28:52 +0800
twxtam@gmail.com ("tam wei") wrote:

> Dear all,
>
> I am intending to store the files inside the postgres DB using the
> type text (all the files will be pre-encode into base64. The reason
> for not using the type bytea as I encountered some undesired
> format(the original file alignment can't be preserved) while
> extracting the content and display iit using php).
Hi,

Make sure you don't have any unwanted caracters before or after the php tags (<? ?> or <?php ?>) in your main script
andincludes. Php will output them, thus breaking your file. 
A more robust workaround is using output buffering to clear any unwanted output before sending the file...

I have no problem storing bytea objects and retreiving them. Using output buffering allows you to use ob_gzhandler to
reducenetwork bandwith if needed...  

HTH,
--
MaXX

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Locking for function creation
Следующее
От: Oleg Bartunov
Дата:
Сообщение: GiN for 8.1 patch updated