Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Net Tree Inc.
Why am I keep getting error with version issues I am trying to restore a backup file from a 8.4 postgresql server to a 8.3 postgresql server. [postg...@localhost ~]$ pg_restore -C -d postgres -i isamdb.backup pg_restore.bin: [archiver] unsupported version (1.11) in file header On Tue, Feb 23

Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Ian Lea
It is unreasonable to expect 8.3 programs to be able to understand everything that 8.4 programs might write. What format is your dump in? Plain text (--format=p) might work. Or try dumping the 8.4 database with the 8.3 version of pg_dump, or maybe use the 8.4 pg_restore against the 8.3 database.

[ADMIN] pg_dump: aborting because of version mismatch

2010-02-23 Thread Net Tree Inc.
>>I am keep getting error of mismatch of pg_dump version. how should one dealing with different version of pg_dump normally? C:\Program Files\pgAdmin III\1.8\pg_dump.exe -h 192.168.222.129 -p 5433 -U postgres -F c -b -v -f "C:\Documents and Settings\steven\Desktop\template.backup" template_postgis

Re: [ADMIN] [GENERAL] pg_dump: aborting because of version mismatch

2010-02-23 Thread Magnus Hagander
2010/2/23 Net Tree Inc. : >>>I am keep getting error of mismatch of pg_dump version. how should one >>>dealing with different version of pg_dump normally? > C:\Program Files\pgAdmin III\1.8\pg_dump.exe -h 192.168.222.129 -p 5433 -U > postgres -F c -b -v -f "C:\Documents and > Settings\steven\Des

Re: [ADMIN] [GENERAL] pg_dump: aborting because of version mismatch

2010-02-23 Thread Net Tree Inc.
Thanks.. This is what I am confused about. I installed a ver. 8.4 postgresql, why it's pg_dump is 8.3.9?? For first one, how could this possibly having problem using pg_dump that comes with the server install?? the first one I backup using pgAdmin III ver. 1.8.4 on a ver 8.3.9 postgreSQL server t

Re: [ADMIN] [GENERAL] pg_dump: aborting because of version mismatch

2010-02-23 Thread Magnus Hagander
2010/2/23 Net Tree Inc. : > Thanks.. > This is what I am confused about. I installed a ver. 8.4 postgresql, why it's > pg_dump is 8.3.9?? For first one, how could this possibly having problem > using pg_dump that comes with the server install?? Comes with what server install? It depends on how y

Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Iñigo Martinez Lasala
Using pg_dump from your new host (that is, newer version) 1- Dump schema. pg_dump -h server_source -U username -s -Fp -f schema.sql database 2- Dump data only. pg_dump -h server_source -U username -a -Fc -f data.dmp database 3- Modify schema. 4- Restore schema in new host. psql -U username -d

Re: [GENERAL] Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Richard Huxton
On 23/02/10 09:17, Net Tree Inc. wrote: Why am I keep getting error with version issues I am trying to restore a backup file from a 8.4 postgresql server to a 8.3 postgresql server. Well, an 8.4 dump isn't always going to be compatible with an 8.3 server, is it? If there weren't difference

Re: [GENERAL] Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Net Tree Inc.
yeah that's what I means to do. How do I use 8.4 pg_restore? the DB server I am trying to restore is using 8.3. Do you mean do pg_restore on the same machine that I did pg_dump?? I am thinking of doing that too, but I am not sure how to do the command. Is this correct? pg_restore -h (my target ma

Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Net Tree Inc.
Thanks. Is it by doing these steps I can avoid constrain restriction? for step 3, how should I modify the schema? and which schema? the target DB's schema that I am trying to dump the schema and data in? But this is the problem, I am not sure whats different between the two schema's, there are just

Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Iñigo Martinez Lasala
To avoid contraints you have to use –disable-triggers flag during restore. That is done in step 5. In order to modify schema you have to locate what is failing. So, first restore old schema without modifications in your new database, watch for errors and fix them. For example: psql -U username

[ADMIN] Query DDL Comments?

2010-02-23 Thread P
Is there a way to query the DDL comments for tables or databases? -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] Sharing /etc/passwd with PostgreSQL

2010-02-23 Thread Bruce Momjian
Tom Lane wrote: > Alvaro Herrera writes: > > It had to do with me having a bogus password in .pgpass (so psql was > > first trying empty password, then the one in .pgpass, and both failing). > > Pilot error. However, I'd say that we ought to give a notice if the > > password in .pgpass fails. >

Re: [ADMIN] Query DDL Comments?

2010-02-23 Thread Tom Lane
P writes: > Is there a way to query the DDL comments for tables or databases? Well, there's psql's \dd, or you could use obj_description and related functions, or you could look directly at the pg_description and pg_shdescription catalogs. regards, tom lane -- Sent via

Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Net Tree Inc.
Quote: "However if you have to modify table definitions, you will probably not be able to import data in that new schema and it will be necesary to look for a new strategy." For schema, are we talking about attribute columns (structure of table) and "table definitions" referraled you talking about

Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Net Tree Inc.
I see something related with Deferrable and Initially deferrable that seems like something could avoid constraints when dumping and restore, but it has to modify the table or re-create all of them to have such option (maybe is what you referraled "table definitions"). Is it what it can be use for t

Re: [ADMIN] [GENERAL] how do I do dump and restore without bugging with constraint?

2010-02-23 Thread Thillai Selvan
I have tried like this. But in my case it is not working when trying to access a column that is not exists in the table. Example: CREATE TABLE test_str (te_id text); INSERT INTO test_str VALUES ('a'); INSERT INTO test_str VALUES ('b'); INSERT INTO test_str VALUES ('c'); SELECT t.name from test