From: | "Marcio A(dot) Sepp" <marcio(at)zyontecnologia(dot)com(dot)br> |
---|---|
To: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | ENC: Possible problem with type bigserial in pg_dump/pg_restore |
Date: | 2007-02-07 16:37:41 |
Message-ID: | 200702071637.l17GbkiQ015139@josephine.concordia.psi.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Pardon, in this example case it works ok. The problem is when i restore this
structure (this is my real case):
CREATE TABLE fat_m.ped_venda_it
(
cd_ped_venda_it_record bigserial NOT NULL,
...
...
)
When the table is created, the sequence is created too:
CREATE SEQUENCE fat_m.ped_venda_it_cd_ped_venda_it_record_seq
When i restore it, and try to insert a record the system show me the
message:
relation "ped_venda_it_cd_ped_venda_it_record" does not exist.
Maybe the problem occurred because the name is too long.
All the other sequence were restored fine.
Please, give me feedback about this problem. If i can help, i'll be
satisfied.
Att.
Márcio A. Sepp
ZYON TECNOLOGIA LTDA
(49) 3444-4591
(49) 8405-9215
> ______________________________________________
> De: Marcio A. Sepp [mailto:marcio(at)zyontecnologia(dot)com(dot)br]
> Enviada em: quarta-feira, 7 de fevereiro de 2007 12:51
> Para: 'pgsql-bugs(at)postgresql(dot)org'
> Assunto: Possible problem with type bigserial in pg_dump/pg_restore
>
>
> It seems to have a problem when making backup and restore with type
> bigserial. I perceived when was restoring a database and the sequence
> created for field bigserial was not correctly restored.
>
> For example, i've created the follow structure:
>
> CREATE TABLE cager.princ
> (
> cd_princ bigserial NOT NULL,
> nm_princ character varying(50),
> CONSTRAINT "pk-princ-cd_princ" PRIMARY KEY (cd_princ)
> )
> WITHOUT OIDS;
>
> Making backup with:
> C:\Arquivos de programas\pgAdmin III\1.6\pg_dump.exe -i -h 192.168.7.1 -p
> 5432 -U postgres -F c -b -v -f "C:\Temp\testepad.backup" testepad
>
> Making restore with:
> C:\Arquivos de programas\pgAdmin III\1.6\pg_restore.exe -i -h 192.168.7.1
> -p 5432 -U postgres -d test1 -v "C:\Temp\testepad.backup"
>
> The same table now is:
>
> CREATE TABLE cager.princ
> (
> cd_princ bigint NOT NULL DEFAULT
> nextval('princ_cd_princ_seq'::regclass),
> nm_princ character varying(50),
> CONSTRAINT "pk-princ-cd_princ" PRIMARY KEY (cd_princ)
> )
> WITHOUT OIDS;
>
> Take a look at the field cd_princ. Next value should be
> 'cager.princ_cd_princ_seq'.
>
> I've tested it with pg_admin version 1.6.2 and 1.4.3.
>
> If need more information, please, contact me.
>
> Follow in annex messages on restoring.
>
>
>
>
> Att.
> Márcio A. Sepp
> ZYON TECNOLOGIA LTDA
> 55 (49) 3444-4591
> 55 (49) 8405-9215
>
Attachment | Content-Type | Size |
---|---|---|
error_on_restoring.txt | text/plain | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Asif | 2007-02-07 18:47:28 | BUG #2981: server crash |
Previous Message | Walter Cruz | 2007-02-07 16:22:57 | BUG #2980: check constraint fails on update |