hum... eu achei que o restore, deletava meu banco de dados, e criava
outro... porque eu modifico as colunas das tabelas, entao, fazer somente o
restore dos dados não daria..

Não teria como, eu remover o banco e criar outro através do restore?

[]s

2008/4/1, Joao <[EMAIL PROTECTED]>:
>
>  vc ja possuii a linguagem pl pgsql instalada e tb o dominio d_cnpj, a
> tabela empresa.... ou seja vc ja possui grande parte dos objetos do dump no
> seu banco de dados!!!
> faça o backup somente dos dados, ou crie um banco vazio e restaure!
>
> ----- Original Message -----
> *From:* Fellipe Henrique <[EMAIL PROTECTED]>
> *To:* Comunidade PostgreSQL Brasileira<[email protected]>
> *Sent:* Tuesday, April 01, 2008 10:34 AM
> *Subject:* [pgbr-geral] Porque dá esse erro, ao voltar com um backup?
>
> Olá amigos, estou criando uma base de dados, hoje, tem apenas 3 tabelas e
> nenhum registro, mas utilizo notebook e pc pra desenvolver, entao e faço um
> backup-restore dependendo pra onde vou.. mas sempre ao fazer um restore, dá
> a seguinte mensagem:
>
> O que pode ser?
>
>
> C:\Arquivos de programas\PostgreSQL\8.3\bin\pg_restore.exe -i -h localhost
> -p 5432 -U postgres -d nexus_db -v "F:\nexusdb.backup"
> pg_restore: connecting to database for restore
> pg_restore: creating SCHEMA public
> pg_restore: creating COMMENT SCHEMA public
> pg_restore: creating PROCEDURAL LANGUAGE plpgsql
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 338; 2612 16386
> PROCEDURAL LANGUAGE plpgsql postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  language
> "plpgsql" already exists
>     Command was:
> CREATE PROCEDURAL LANGUAGE plpgsql;
> pg_restore: creating TYPE breakpoint
> pg_restore: creating DOMAIN d_cnpj
> pg_restore: [archiver (db)] Error from TOC entry 322; 1247 16440 DOMAIN
> d_cnpj postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  type "d_cnpj"
> already exists
>     Command was: CREATE DOMAIN d_cnpj AS character(18);
> pg_restore: creating TABLE empresa
> pg_restore: [archiver (db)] Error from TOC entry 1517; 1259 16470 TABLE
> empresa postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  relation
> "empresa" already exists
>     Command was: CREATE TABLE empresa (
>     idempresa integer NOT NULL,
>     ativo boolean DEFAULT true NOT NULL,
>     matriz boolean DEFAULT f...
> pg_restore: creating TYPE frame
> pg_restore: creating TYPE proxyinfo
> pg_restore: creating TABLE sys_seq
> pg_restore: [archiver (db)] Error from TOC entry 1515; 1259 16448 TABLE
> sys_seq postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  relation
> "sys_seq" already exists
>     Command was: CREATE TABLE sys_seq (
>     seq_empresa integer NOT NULL,
>     seq_tabela character varying(150) NOT NULL,
>     seq_campo chara...
> pg_restore: creating TABLE sys_seq_pend
> pg_restore: [archiver (db)] Error from TOC entry 1516; 1259 16451 TABLE
> sys_seq_pend postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  relation
> "sys_seq_pend" already exists
>     Command was: CREATE TABLE sys_seq_pend (
>     seq_empresa integer NOT NULL,
>     seq_tabela character varying(150) NOT NULL,
>     seq_campo ...
> pg_restore: creating TYPE targetinfo
> pg_restore: creating DOMAIN d_descricao
> pg_restore: creating DOMAIN d_nome
> pg_restore: creating TABLE usuario
> pg_restore: creating TABLE usuario_empresa
> pg_restore: creating TYPE var
> pg_restore: creating DOMAIN d_cpf
> pg_restore: [archiver (db)] Error from TOC entry 327; 1247 16454 DOMAIN
> d_cpf postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  type "d_cpf"
> already exists
>     Command was: CREATE DOMAIN d_cpf AS character(14);
> pg_restore: creating FUNCTION autoinc()
> pg_restore: [archiver (db)] Error from TOC entry 20; 1255 16403 FUNCTION
> autoinc() postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  function
> "autoinc" already exists with same argument types
>     Command was: CREATE FUNCTION autoinc() RETURNS trigger
>     AS '$libdir/autoinc', 'autoinc'
>     LANGUAGE c;
> pg_restore: creating FUNCTION f_cnpjcpf(integer, character)
> pg_restore: [archiver (db)] Error from TOC entry 41; 1255 16455 FUNCTION
> f_cnpjcpf(integer, character) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  function
> "f_cnpjcpf" already exists with same argument types
>     Command was: CREATE FUNCTION f_cnpjcpf(integer, character) RETURNS
> integer
>     AS $_$
>
> DECLARE
>
>
>
> -- Argumentos
>
> -- Tipo de verificacao :...
> pg_restore: creating FUNCTION f_retornaid(integer, character varying,
> character varying, boolean, integer)
> pg_restore: [archiver (db)] Error from TOC entry 42; 1255 16456 FUNCTION
> f_retornaid(integer, character varying, character varying, boolean, integer)
> postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  function
> "f_retornaid" already exists with same argument types
>     Command was: CREATE FUNCTION f_retornaid(i_empresa integer, i_tabela
> character varying, i_campo character varying, i_pendencia boolean, i...
> pg_restore: creating FUNCTION pldbg_abort_target(integer)
> pg_restore: creating FUNCTION pldbg_attach_to_port(integer)
> pg_restore: creating FUNCTION pldbg_continue(integer)
> pg_restore: creating FUNCTION pldbg_create_listener()
> pg_restore: creating FUNCTION pldbg_deposit_value(integer, text, integer,
> text)
> pg_restore: creating FUNCTION pldbg_drop_breakpoint(integer, oid, integer)
> pg_restore: creating FUNCTION pldbg_get_breakpoints(integer)
> pg_restore: creating FUNCTION pldbg_get_proxy_info()
> pg_restore: creating FUNCTION pldbg_get_source(integer, oid)
> pg_restore: creating FUNCTION pldbg_get_stack(integer)
> pg_restore: creating FUNCTION pldbg_get_target_info(text, "char")
> pg_restore: creating FUNCTION pldbg_get_variables(integer)
> pg_restore: creating FUNCTION pldbg_select_frame(integer, integer)
> pg_restore: creating FUNCTION pldbg_set_breakpoint(integer, oid, integer)
> pg_restore: creating FUNCTION pldbg_set_global_breakpoint(integer, oid,
> integer, integer)
> pg_restore: creating FUNCTION pldbg_step_into(integer)
> pg_restore: creating FUNCTION pldbg_step_over(integer)
> pg_restore: creating FUNCTION pldbg_wait_for_breakpoint(integer)
> pg_restore: creating FUNCTION pldbg_wait_for_target(integer)
> pg_restore: creating FUNCTION plpgsql_oid_debug(oid)
> pg_restore: restoring data for table "empresa"
> pg_restore: [archiver (db)] Error from TOC entry 1807; 0 16470 TABLE DATA
> empresa postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  column
> "matriz" of relation "empresa" does not exist
>     Command was: COPY empresa (idempresa, ativo, matriz, razao_social,
> cnpj) FROM stdin;
> pg_restore: restoring data for table "sys_seq"
> pg_restore: restoring data for table "sys_seq_pend"
> pg_restore: restoring data for table "usuario"
> pg_restore: restoring data for table "usuario_empresa"
> pg_restore: creating CONSTRAINT empresa_pkey
> pg_restore: [archiver (db)] Error from TOC entry 1798; 2606 16479
> CONSTRAINT empresa_pkey postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  multiple
> primary keys for table "empresa" are not allowed
>     Command was: ALTER TABLE ONLY empresa
>     ADD CONSTRAINT empresa_pkey PRIMARY KEY (idempresa);
> pg_restore: creating CONSTRAINT sys_seq_pend_pkey
> pg_restore: [archiver (db)] Error from TOC entry 1796; 2606 16460
> CONSTRAINT sys_seq_pend_pkey postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  multiple
> primary keys for table "sys_seq_pend" are not allowed
>     Command was: ALTER TABLE ONLY sys_seq_pend
>     ADD CONSTRAINT sys_seq_pend_pkey PRIMARY KEY (seq_empresa, seq_tabela,
> seq_campo, seq_valor);
> pg_restore: creating CONSTRAINT sys_seq_pkey
> pg_restore: [archiver (db)] Error from TOC entry 1794; 2606 16462
> CONSTRAINT sys_seq_pkey postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  multiple
> primary keys for table "sys_seq" are not allowed
>     Command was: ALTER TABLE ONLY sys_seq
>     ADD CONSTRAINT sys_seq_pkey PRIMARY KEY (seq_empresa, seq_tabela,
> seq_campo);
> pg_restore: creating CONSTRAINT usuario_empresa_pkey
> pg_restore: creating CONSTRAINT usuario_login_key
> pg_restore: creating CONSTRAINT usuario_pkey
> pg_restore: setting owner and privileges for SCHEMA public
> pg_restore: setting owner and privileges for COMMENT SCHEMA public
> pg_restore: setting owner and privileges for ACL public
> pg_restore: setting owner and privileges for PROCEDURAL LANGUAGE plpgsql
> pg_restore: setting owner and privileges for TYPE breakpoint
> pg_restore: setting owner and privileges for DOMAIN d_cnpj
> pg_restore: setting owner and privileges for TABLE empresa
> pg_restore: setting owner and privileges for TYPE frame
> pg_restore: setting owner and privileges for TYPE proxyinfo
> pg_restore: setting owner and privileges for TABLE sys_seq
> pg_restore: setting owner and privileges for TABLE sys_seq_pend
> pg_restore: setting owner and privileges for TYPE targetinfo
> pg_restore: setting owner and privileges for DOMAIN d_descricao
> pg_restore: setting owner and privileges for DOMAIN d_nome
> pg_restore: setting owner and privileges for TABLE usuario
> pg_restore: setting owner and privileges for TABLE usuario_empresa
> pg_restore: setting owner and privileges for TYPE var
> pg_restore: setting owner and privileges for DOMAIN d_cpf
> pg_restore: setting owner and privileges for FUNCTION autoinc()
> pg_restore: setting owner and privileges for FUNCTION f_cnpjcpf(integer,
> character)
> pg_restore: setting owner and privileges for FUNCTION f_retornaid(integer,
> character varying, character varying, boolean, integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_abort_target(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_attach_to_port(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_continue(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_create_listener()
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_deposit_value(integer, text, integer, text)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_drop_breakpoint(integer, oid, integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_get_breakpoints(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_get_proxy_info()
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_get_source(integer, oid)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_get_stack(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_get_target_info(text, "char")
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_get_variables(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_select_frame(integer, integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_set_breakpoint(integer, oid, integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_set_global_breakpoint(integer, oid, integer, integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_step_into(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_step_over(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_wait_for_breakpoint(integer)
> pg_restore: setting owner and privileges for FUNCTION
> pldbg_wait_for_target(integer)
> pg_restore: setting owner and privileges for FUNCTION
> plpgsql_oid_debug(oid)
> pg_restore: setting owner and privileges for CONSTRAINT empresa_pkey
> pg_restore: setting owner and privileges for CONSTRAINT sys_seq_pend_pkey
> pg_restore: setting owner and privileges for CONSTRAINT sys_seq_pkey
> pg_restore: setting owner and privileges for CONSTRAINT
> usuario_empresa_pkey
> pg_restore: setting owner and privileges for CONSTRAINT usuario_login_key
> pg_restore: setting owner and privileges for CONSTRAINT usuario_pkey
> WARNING: errors ignored on restore: 13
>
> Processo retornou código de saída 1.
>
>
> --
> _________________________________
> T.·.F.·.A.·.
> Fellipe Henrique
> [EMAIL PROTECTED]
>
> Cansou do MercadoLivre como eu? Tente o 
> www.uaileilão.com.br<http://www.uaileil%C3%A3o.com.br>.
>
>
> ------------------------------
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>


-- 
_________________________________
T.·.F.·.A.·.
Fellipe Henrique
[EMAIL PROTECTED]

Cansou do MercadoLivre como eu? Tente o www.uaileilão.com.br.
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a