Обсуждение: db

Поиск
Список
Период
Сортировка

db

От
"Daniel Phlander"
Дата:

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
 
[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]$

Re: db

От
Kris Jurka
Дата:

On Tue, 1 Jul 2003, Daniel Phlander 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

pg_dump only allows moving to an equal or greater version of postgresql,
so you're kind of out of luck moving 7.3.3 -> 7.2.4

Kris Jurka


Re: db [Viruschecked]

От
"Patric Bechtel"
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 1 Jul 2003 13:34:35 +0300, Daniel Phlander 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 ),
whichI 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
PgSQL7.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

Hello Daniel,

I do this regularly, too, and do it with this combination:

pgdump -Fp -f <file> -d <databasename>

and then (on the "other side")

psql <databasename>
\i <file>

works fine. Sometimes I've to correct a few lines at the beginning, meddling with schema paths and such. But that's it.

Hope that helps,

Patric


PGP Public Key Fingerprint: 2636 F26E F523 7D62  4377 D206 7C68 06BB

-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its affiliated companies.

iQA/AwUBPwKPFnxoBrvMu8qQEQKfiQCgttjLDoHBppyVM7K16R32lauXCV8AoNHZ
kjB6sNT757Is8NriN01UUxkU
=auKY
-----END PGP SIGNATURE-----



Re: db

От
"scott.marlowe"
Дата:
On Tue, 1 Jul 2003, Kris Jurka wrote:

>
>
> On Tue, 1 Jul 2003, Daniel Phlander 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
>
> pg_dump only allows moving to an equal or greater version of postgresql,
> so you're kind of out of luck moving 7.3.3 -> 7.2.4

Note that standard operating procedure is to use the version of pg_dump
for the version of the database you're going to.

i.e. to dump a 7.3 db to 7.2, you need to use the pg_dump from 7.2.

This comes with the caveat that until version 7.4, no real effort was made
for pg_dumpall to handle different versions of your database, meaning
individual databases can be dumped like this, but not whole clusters.




Re: db

От
Kris Jurka
Дата:

On Wed, 2 Jul 2003, scott.marlowe wrote:

> On Tue, 1 Jul 2003, Kris Jurka wrote:
>
> >
> >
> > On Tue, 1 Jul 2003, Daniel Phlander 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
> >
> > pg_dump only allows moving to an equal or greater version of postgresql,
> > so you're kind of out of luck moving 7.3.3 -> 7.2.4
>
> Note that standard operating procedure is to use the version of pg_dump
> for the version of the database you're going to.
>
> i.e. to dump a 7.3 db to 7.2, you need to use the pg_dump from 7.2.

Clearly not

./pg72/bin/pg_dump template1

pg_dump: server version: PostgreSQL 7.3.3 on i386-pc-linux-gnu, compiled
by GCC gcc (GCC) 3.3 (Debian); pg_dump version: 7.2.3
pg_dump: aborting because of version mismatch (Use the -i option to proceed
anyway.)

./pg72/bin/pg_dump -i template1

pg_dump: server version: PostgreSQL 7.3.3 on i386-pc-linux-gnu, compiled
by GCC gcc (GCC) 3.3 (Debian); pg_dump version: 7.2.3
pg_dump: proceeding despite version mismatch
pg_dump: query to obtain list of data types failed: ERROR:  Attribute
"typprtlen" not found

Kris Jurka