pg_dump ,pg_restore problem

From: Martin Ruff <mruff(at)simeon(dot)ch>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: pg_dump ,pg_restore problem
Date: 2003-03-19 10:28:31
Message-ID: 56833.194.209.146.43.1048069711.squirrel@mail.simeon.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I dump a table and then try to restore and get the error message
[archiever] input file does not appear to be a valid archive

what I do:
pg_dump -d -f reportingdump -t holidaycalendar reporting

this results in the following dump file(some data removed)
--
-- PostgreSQL database dump
--

\connect - mruff

SET search_path = public, pg_catalog;

--
-- TOC entry 2 (OID 17149)
-- Name: holidaycalendar; Type: TABLE; Schema: public; Owner: mruff
--

CREATE TABLE holidaycalendar (
id serial NOT NULL,
holidaydate date NOT NULL,
holidayhours numeric(2,0) NOT NULL,
description character varying(1000) NOT NULL
);

--
-- Data for TOC entry 6 (OID 17149)
-- Name: holidaycalendar; Type: TABLE DATA; Schema: public; Owner: mruff
--

INSERT INTO holidaycalendar VALUES (1, '1999-01-01', 8, 'Neujahr');
INSERT INTO holidaycalendar VALUES (3, '1999-01-02', 8, 'Berchtoldstag');
...
--
-- TOC entry 5 (OID 17152)
-- Name: holidaycalendar_pkey; Type: CONSTRAINT; Schema: public; Owner: mruff
--

ALTER TABLE ONLY holidaycalendar
ADD CONSTRAINT holidaycalendar_pkey PRIMARY KEY (id);

--
-- TOC entry 4 (OID 17154)
-- Name: holidaycalendar_holidaydate_key; Type: CONSTRAINT; Schema:
public; Owner: mruff
--

ALTER TABLE ONLY holidaycalendar
ADD CONSTRAINT holidaycalendar_holidaydate_key UNIQUE (holidaydate);

--
-- TOC entry 3 (OID 17147)
-- Name: holidaycalendar_id_seq; Type: SEQUENCE SET; Schema: public;
Owner: mruff
--

SELECT pg_catalog.setval ('holidaycalendar_id_seq', 1, false);

then I try to restore:
pg_restore -a reportingdump -d reporting -t holidaycalendar
and get the error:
[archiever] input file does not appear to be a valid archive

thanks for help

-------------------------------------------
Be the change you want to see in the world.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-03-19 14:22:46 Re: Problems using palloc in postgresql user C functions
Previous Message John Gunther 2003-03-19 06:49:57 Re: Problems using palloc in postgresql user C functions