473,324 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #1
6 3484
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: pg*****************@postgresql.org
[mailto:pg*****************@postgresql.org]On Behalf Of Együd Csaba
Sent: 2004. június 7. 10:38
To: Pg***********@Postgresql.Org (E-mail)
Subject: [GENERAL] 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.

---------------------------(end of
broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to
ma*******@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.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2
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: pg*****************@postgresql.org
[mailto:pg*****************@postgresql.org]On Behalf Of Együd Csaba
Sent: 2004. június 7. 10:38
To: Pg***********@Postgresql.Org (E-mail)
Subject: [GENERAL] 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.

---------------------------(end of
broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to
ma*******@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.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #3
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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #4
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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #5
Hi Shridhar,
thank you for your reply. It is really a good idea. I'll think it over.

Many thanks,
-- Csaba
-----Original Message-----
From: pg*****************@postgresql.org
[mailto:pg*****************@postgresql.org]On Behalf Of Shridhar
Daithankar
Sent: 2004. június 7. 13:59
To: cs*****@vnet.hu
Cc: 'P************@Postgresql.Org (E-mail)'
Subject: Re: [GENERAL] pg_dump, bytea, dump order questions
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

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
ma*******@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.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #6
Hi Shridhar,
thank you for your reply. It is really a good idea. I'll think it over.

Many thanks,
-- Csaba
-----Original Message-----
From: pg*****************@postgresql.org
[mailto:pg*****************@postgresql.org]On Behalf Of Shridhar
Daithankar
Sent: 2004. június 7. 13:59
To: cs*****@vnet.hu
Cc: 'P************@Postgresql.Org (E-mail)'
Subject: Re: [GENERAL] pg_dump, bytea, dump order questions
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

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
ma*******@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.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ruth Hsieh | last post by:
The postgreSQL release used is 7.3.4. We would like to dump the objects for particular user. How? I used -U option, the result still dump all the objects with all the users. In order to...
7
by: Ed L. | last post by:
We are seeing what looks like pgsql data file corruption across multiple clusters on a RAID5 partition on a single redhat linux 2.4 server running 7.3.4. System has ~20 clusters installed with a...
1
by: Ben-Nes Michael | last post by:
Hello Im getting strange errors when restoring data from pg_dump files: ERROR: duplicate key violates unique constraint "products_pkey" CONTEXT: COPY products, line 1: "98 Super Pak Ruby...
6
by: Michal Hlavac | last post by:
Hellou, when I use pg_dump database > dump.dat on database with tsearch2 and then psql database < dump.dat - this command fails, because in dump.dat is declaration of tsearch2 procedures and...
0
by: Együd Csaba | last post by:
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...
1
by: Neil Zanella | last post by:
Hello, I have an SQL database which I create with: psql -f create.sql foodb I then access this database and perform several insertions, modifications, and deletions. Finally, I want to...
6
by: Ilia Chipitsine | last post by:
Dear Sirs, I want to dump all databases, but separately each database in its own file, not all databases in one single file as pg_dumpall does. How can I implement that ? Cheers, Ilia...
2
by: Anony Mous | last post by:
Hi, I've seen in previous posts that recommended practice for database backup is to run the dump utility twice. Once for schema only and a second time for data only (I think). Up to know,...
4
by: Együd Csaba | last post by:
Hi, the restoration of a dump stops at the line above. The dump was created with pgsql 7.3.2 and I need to pump it into a 7.4.3 one. Should anybody tell me what the problem can be and how I can...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.