469,573 Members | 1,685 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

pg_dump and tsearch2

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 types after main schema, which is
using tsearch2.

is this patch for this??
http://www.sai.msu.su/~megera/postgr...e_7.4.patch.gz

How Can I use this patch on cygwin???

thank you, hlavki

---------------------------(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 #1
6 1843
Yes, it's possible.

Michal Hlavac wrote:
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 types after main schema, which is
using tsearch2.

is this patch for this??
http://www.sai.msu.su/~megera/postgr...e_7.4.patch.gz
How Can I use this patch on cygwin???

thank you, hlavki

---------------------------(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


--
Teodor Sigaev E-mail: te****@sigaev.ru

---------------------------(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
Yes, it's possible.

Michal Hlavac wrote:
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 types after main schema, which is
using tsearch2.

is this patch for this??
http://www.sai.msu.su/~megera/postgr...e_7.4.patch.gz
How Can I use this patch on cygwin???

thank you, hlavki

---------------------------(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


--
Teodor Sigaev E-mail: te****@sigaev.ru

---------------------------(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
sorry for my strictness. My problem is with type tsvector.

I have table in my schema with column of tsvector type. During importing
dump.dat (with psql database < dump.dat) postgresql returns:
ERROR: type "tsvector" does not exist

It is because declaration of tsvector is after declaration of table with
tsvector column...

That patch is for procefures... Or there is some other problems...
I am using 7.4.2 on cygwin.

thanks, hlavki
---------------------------(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
sorry for my strictness. My problem is with type tsvector.

I have table in my schema with column of tsvector type. During importing
dump.dat (with psql database < dump.dat) postgresql returns:
ERROR: type "tsvector" does not exist

It is because declaration of tsvector is after declaration of table with
tsvector column...

That patch is for procefures... Or there is some other problems...
I am using 7.4.2 on cygwin.

thanks, hlavki
---------------------------(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
Michal Hlavac <hl****@medium13.sk> writes:
sorry for my strictness. My problem is with type tsvector.
It is because declaration of tsvector is after declaration of table with
tsvector column...


Right. This typically happens when you added a tsvector column to a
table that existed before the tsvector type was created. 7.4 and before
pg_dump tend to dump the objects in creation order and so have a
problem. (CVS tip pg_dump is smarter, but I don't know if you can/want
to use it.)

What would probably work is to load the tsearch stuff into the new
database and then restore your dump. You'll get errors when the script
tries to load the old tsearch objects, but you can ignore them.

If you're using pg_restore, another way is to make use of the feature
pg_restore has for manual control of the restore order.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #6
Michal Hlavac <hl****@medium13.sk> writes:
sorry for my strictness. My problem is with type tsvector.
It is because declaration of tsvector is after declaration of table with
tsvector column...


Right. This typically happens when you added a tsvector column to a
table that existed before the tsvector type was created. 7.4 and before
pg_dump tend to dump the objects in creation order and so have a
problem. (CVS tip pg_dump is smarter, but I don't know if you can/want
to use it.)

What would probably work is to load the tsearch stuff into the new
database and then restore your dump. You'll get errors when the script
tries to load the old tsearch objects, but you can ignore them.

If you're using pg_restore, another way is to make use of the feature
pg_restore has for manual control of the restore order.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Nigel J. Andrews | last post: by
1 post views Thread by psql-mail | last post: by
reply views Thread by konf | last post: by
2 posts views Thread by Fischer Ulrich | last post: by
reply views Thread by Michal Hlavac | last post: by
3 posts views Thread by Marcel Boscher | last post: by
2 posts views Thread by Net Virtual Mailing Lists | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.