issue when export/import table including pictures

From: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: issue when export/import table including pictures
Date: 2007-04-15 07:33:12
Message-ID: 75645bbb0704150033s354c1627u6c30822769ce42a3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

As i did not get any answer yesterday i'm asking it again.
I have a table with pictures stored as bytea field.
I'm able to export them from my database hosted by my web supplier.
However, when i try to import them to my local database, i get 2 types of
error message (based on how i import them)

1. if import is done by SQL -> run SQL script in phppgadmin : error message
is " No server supplied!"
2. if import is done by Import function from a table in phppgadmin : error
message is "Import error: File could not be uploaded to the server"

here is a sample of my export table in SQL format :

--SET client_encoding = 'UTF8';
--SET standard_conforming_strings = off;
--SET check_function_bodies = false;
--SET client_min_messages = warning;
--SET escape_string_warning = off;

SET search_path = immense, pg_catalog;
SELECT pg_catalog.setval('photo_photo_id_seq', 30, true);
INSERT INTO photo VALUES (1, 1, '2007-02-25 00:00:00',
'\\377\\330\\377\\3412\\004Exif\\000 ..... 32E\\303\\215\\235?\\377\\331');

i truncated the last field due to its length :-)
SO as i have such problem with phppgadmin, i use pgadmin GUI under windows.
But pgadmin deletes the bytea information in thie INSERT INTO SQL command
:-( and i do not know why.
what could be the problem ?
thanks for your help.

--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5

Responses

Browse pgsql-general by date

  From Date Subject
Next Message richyen3@gmail.com 2007-04-15 13:35:58 autovacuum vacuums entire database...is this right?
Previous Message Michael Fuhr 2007-04-15 01:59:39 Re: pg_dump seg fault on sequences