pg_dump, bytea, dump order questions
Hi All,
I'd like to dump out my database using plain text format. Everything is ok,
but the bytea filds.
Restoring the dump file (using <<psql -f LO_TRY_INSERT_BYTEA.sql tmp7>>) it
sends an error message like
psql:LO_TRY_INSERT_BYTEA.sql:14: ERROR: Bad input string for type bytea
Trying dumping with copy commands it sends this error:
psql:LO_TRY_COPY_BYTEA.sql:13: lost synchronization with server, resetting
connection
I used <<pg_dump -d ...>> and <<pg_dump ...>> formats for creating dump
files.
How should I use pg_dump to make it able to back my binary data correctly?
An other question. How can I make psql to change the dupm order of db
objects? My problem is, that one of my table fields has a default clasuse
using a plpgsql function. As being functions dumped after table definitions
creating these tables fail. What can I do in order to avoid these problems -
without modifying every dump file by hand?
Any help is appreciated.
Thank you,
-- Egy�d Csaba
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 2004. 06. 04.
Hi,
answering partially my questions the first problem is actualy solved. My
text editor inserted a linebreak into the middle of the row at position
16384. :) Should change my editor...??? :)
The other question is yet a question. Is there any way to dump first the
functions and then the table definitions?
Thank you very much,
-- Csaba Egy�d
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Egy�d Csaba
Sent: 2004. j�nius 7. 10:38
To: Pgsql-General@Postgresql.Org (E-mail)
Subject: [GENERAL] pg_dump, bytea, dump order questionsHi All,
I'd like to dump out my database using plain text format.
Everything is ok,
but the bytea filds.Restoring the dump file (using <<psql -f
LO_TRY_INSERT_BYTEA.sql tmp7>>) it
sends an error message like
psql:LO_TRY_INSERT_BYTEA.sql:14: ERROR: Bad input string
for type byteaTrying dumping with copy commands it sends this error:
psql:LO_TRY_COPY_BYTEA.sql:13: lost synchronization with
server, resetting
connectionI used <<pg_dump -d ...>> and <<pg_dump ...>> formats for
creating dump
files.How should I use pg_dump to make it able to back my binary
data correctly?An other question. How can I make psql to change the dupm order of db
objects? My problem is, that one of my table fields has a
default clasuse
using a plpgsql function. As being functions dumped after
table definitions
creating these tables fail. What can I do in order to avoid
these problems -
without modifying every dump file by hand?Any help is appreciated.
Thank you,
-- Egy�d Csaba---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 2004. 06. 04.---------------------------(end of
broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 2004. 06. 04.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 2004. 06. 04.
Egy�d Csaba wrote:
Hi,
answering partially my questions the first problem is actualy solved. My
text editor inserted a linebreak into the middle of the row at position
16384. :) Should change my editor...??? :)The other question is yet a question. Is there any way to dump first the
functions and then the table definitions?
If you have the functions in separate schema/database, you can manually
dump/restore that first.
HTH
Shridhar
Hi Shridhar,
thank you for your reply. It is really a good idea. I'll think it over.
Many thanks,
-- Csaba
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Shridhar
Daithankar
Sent: 2004. j�nius 7. 13:59
To: csegyud@vnet.hu
Cc: 'Pgsql-General@Postgresql.Org (E-mail)'
Subject: Re: [GENERAL] pg_dump, bytea, dump order questionsEgy�d Csaba wrote:
Hi,
answering partially my questions the first problem isactualy solved. My
text editor inserted a linebreak into the middle of the row
at position
16384. :) Should change my editor...??? :)
The other question is yet a question. Is there any way to
dump first the
functions and then the table definitions?
If you have the functions in separate schema/database, you
can manually
dump/restore that first.HTH
Shridhar
---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 2004. 06. 04.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 2004. 06. 04.