Thread: db problem

db problem

From
"Daniel Phlander"
Date:
Hello!
I have a problem:
I have installed PostgreSQL 7.3.3 and I have also put in the db a ( /usr/local/pgsql/bin/pg_dumpall > backup.sql ), which I made from a PostgreSQL 7.2.4.  backup.sql; has uploaded with no problem, but now in the applications on which I work I have to make backup.sql from PgSQL 7.3.3 and to put into PgSQL 7.2.4., but I see this is not working (I have errors).
I want to know how can I put a backup.sql made on a PgSQL 7.3.3 and to upload it into PgSQL 7.2.4. ?
I look forward to hear from you! Thanks.
Daniel

Re: db problem

From
Aarni
Date:
Hi Daniel,

As far as I remember I got this working ok with

pg_dumpall -c > backup

and

psql -e template1 < backup

But why not just upgrade the other machine too ?

BR,

Aarni

On Monday 30 June 2003 18:33, you wrote:
> Hello!
> I have a problem:
> I have installed PostgreSQL 7.3.3 and I have also put in the db a (
> /usr/local/pgsql/bin/pg_dumpall > backup.sql ), which I made from a
> PostgreSQL 7.2.4.  backup.sql; has uploaded with no problem, but now in the
> applications on which I work I have to make backup.sql from PgSQL 7.3.3 and
> to put into PgSQL 7.2.4., but I see this is not working (I have errors). I
> want to know how can I put a backup.sql made on a PgSQL 7.3.3 and to upload
> it into PgSQL 7.2.4. ? I look forward to hear from you! Thanks.
> Daniel

--
Aarni Ruuhimäki
Megative Tmi
KYMI.com

Pääsintie 26
45100 Kouvola
FINLAND

info@kymi.com / aarni.ruuhimaki@kymi.com

05 - 3755 035 / 050 - 4910 037
-------------------------------
Linux RedHat 7.3. / KDE 3.0
-------------------------------



Re: db problem

From
Aarni
Date:
Hi,

My answer was really from 'the top of my red hat' ...

Did you try it ? Dumping with -c switch creates a file which will first DROP
and then CREATE. There are differences with integer data types and NULL
values, though. So I'am not sure if it will work. I can't test it as we just
upgraded all machines to 7.3.3.

Someone here has an answer ?

BR,

Aarni



I was glad to receive your message!
Let me explain you my problem:
I had installed on my machine pgsql.7.2.4, I made backup.sql to the db. Then
I have installed pgsql.7.3.3 (last version) and then I uploaded backup.sql
everything was okay.
Now I have two machines. The first one running on pgsql.7.2.4 and the second
one on pgsql.7.3.3.
My problem is that I cannot upload the backup.sql from 7.3.3 into 7.2.4
because it results in error.
I cannot just upgrade the other machine too from 7.2.4 into 7.3.x because
the programs which are running on 7.2.4 don`t support 7.3.x
My question is: how can I uploade backup.sql from 7.3.3 into 7.2.4?
I look forward to hear from you! Thank you!
Daniel


On Tuesday 01 July 2003 12:46, you wrote:
> Hi again!
> Here is the error I have:
>
> [gnuworld@nx2 gnuworld]$ /usr/local/pgsql/bin/psql ccontrol < ccontrol.sql
> You are now connected as new user gnuworld.
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> ERROR:  parser: parse error at or near "public"
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> ERROR:  parser: parse error at or near "("
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \.
> ERROR:  parser: parse error at or near "4"
> invalid command \.
> ERROR:  parser: parse error at or near "4"
> ERROR:  parser: parse error at or near "ACCESS"
> ERROR:  parser: parse error at or near "moduser"
> invalid command \.
> ERROR:  parser: parse error at or near "gchan"
> invalid command \.
> ERROR:  parser: parse error at or near "190"
> invalid command \.
> ERROR:  parser: parse error at or near "mciuc"
> invalid command \.
> ERROR:  parser: parse error at or near "("
> invalid command \.
> ERROR:  parser: parse error at or near "("
> invalid command \.
> ERROR:  parser: parse error at or near "("
> invalid command \.
> ERROR:  parser: parse error at or near "ACCESS"
> invalid command \.
> ERROR:  parser: parse error at or near "("
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> invalid command \N
> ERROR:  parser: parse error at or near "checkver"
> invalid command \.
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> CREATE
> NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index
> 'opers_pkey' for table 'opers'
> ALTER
> CREATE
> CREATE
> CREATE
> ERROR:  parser: parse error at or near "("
> ERROR:  parser: parse error at or near "("
> ERROR:  parser: parse error at or near "("
> [gnuworld@nx2 gnuworld]$
>
> Daniel
>
> ----- Original Message -----
> From: "Aarni" <aarni.ruuhimaki@kymi.com>
> To: "Daniel Phlander" <phlander@friendnet.org>
> Cc: <pgsql-novice@postgresql.org>
> Sent: Tuesday, July 01, 2003 10:35 AM
> Subject: Re: [NOVICE] db problem
>
> > Hi Daniel,
> >
> > As far as I remember I got this working ok with
> >
> > pg_dumpall -c > backup
> >
> > and
> >
> > psql -e template1 < backup
> >
> > But why not just upgrade the other machine too ?
> >
> > BR,
> >
> > Aarni
> >
> > On Monday 30 June 2003 18:33, you wrote:
> > > Hello!
> > > I have a problem:
> > > I have installed PostgreSQL 7.3.3 and I have also put in the db a (
> > > /usr/local/pgsql/bin/pg_dumpall > backup.sql ), which I made from a
> > > PostgreSQL 7.2.4.  backup.sql; has uploaded with no problem, but now in
>
> the
>
> > > applications on which I work I have to make backup.sql from PgSQL 7.3.3
>
> and
>
> > > to put into PgSQL 7.2.4., but I see this is not working (I have
> > > errors).
>
> I
>
> > > want to know how can I put a backup.sql made on a PgSQL 7.3.3 and to
>
> upload
>
> > > it into PgSQL 7.2.4. ? I look forward to hear from you! Thanks.
> > > Daniel
> >
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




--
Aarni Ruuhimäki
Megative Tmi
KYMI.com

Pääsintie 26
45100 Kouvola
FINLAND

info@kymi.com / aarni.ruuhimaki@kymi.com

+358-5-3755 035 / +358-50-4910 037
-------------------------------
Linux RedHat 7.3. / KDE 3.0
-------------------------------