- Архив списков рассылки pgsql-bugs

Поиск
Список
Период
Сортировка
От Vasoczki Ferenc
Тема
Дата
Msg-id 20070620120009.545C55AF881@svr4.postgresql.org
обсуждение исходный текст
Ответы Re:  (Stéphane Schildknecht<stephane.schildknecht@postgresqlfr.org>)
Список pgsql-bugs
Hi!
=20
I have several problems with pg_dump, and pg_restore, and pgadmin.
=20
1. Pgadmin:
I have 2 Postgresql 8.2. One is on my machine (localhost, windows XP SP2),
and one on the server (debian linux).
I dumped my db from my database.=20
As you wrote here
(http://archives.postgresql.org/pgadmin-support/2006-11/msg00133.php), it
just calls the binary from the command line and sets the params.
=20
C:\Program Files\pgAdmin III\1.6\pg_dump.exe -i -h localhost -p 5432 -U
monarchia_uj -F p -O -D -v -f "C:\tmp\123.sql" monarchia_uj
=20
Ok, the first problem is: It allow me to save with any extension, but the
default is .sql, while when i want to restore, it supposes a .backup.
This isn't a really bug, just now too usable.
=20
I join to this opinion:
=20

Under Windows it won't remember the location I've saved dump to.

Instead, I'll always see my home folder. That's quite an unhandy

thing. E.g. I save a dump to c:\dumps and at the next step want to

restore it. Consider it more logical to see c:\dumps in the dialog

window.



No - patches are always welcome :-)


So, the real problem is:
I want to restore this 123.sql into the servers postgresql.
Open pgadmin, connect to server, go to database, right click and restore.
I select the file, and the OK button is disabled. (readonly, grey,
whatever). Why is that, i made my backup with this pgadmin, so it should be
correct backup file.
(I tried, to dump it out from  the console, and restore with pgadmin, there
is the same situation).
=20
Ok, no problem, i can use this dump like an sql query, so do it:
=20
--
-- PostgreSQL database dump
--
=20
SET client_encoding =3D 'SQL_ASCII';
SET standard_conforming_strings =3D off;
SET check_function_bodies =3D false;
SET client_min_messages =3D warning;
SET escape_string_warning =3D off;
=20
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--
=20
COMMENT ON SCHEMA public IS 'Standard public schema';
=20

--
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--
=20
CREATE PROCEDURAL LANGUAGE plpgsql;
=20

SET search_path =3D public, pg_catalog;
=20
SET default_tablespace =3D '';
=20
SET default_with_oids =3D false;
=20
--
-- Name: admin_jogok; Type: TABLE; Schema: public; Owner: monarchia_uj;
Tablespace:=20
--
=20
CREATE TABLE admin_jogok (
    admin_id integer,
    jog_id character varying(100),
    aj_id integer NOT NULL,
    alfuncid character varying(100)
);
=20

ALTER TABLE public.admin_jogok OWNER TO monarchia_uj;
=20
--
-- Name: admin_jogok_aj_id_seq; Type: SEQUENCE; Schema: public; Owner:
monarchia_uj
--
=20
CREATE SEQUENCE admin_jogok_aj_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;
=20

ALTER TABLE public.admin_jogok_aj_id_seq OWNER TO monarchia_uj;
=20

--
-- Name: admin_jogok_aj_id_seq; Type: SEQUENCE OWNED BY; Schema: public;
Owner: monarchia_uj
--
=20
ALTER SEQUENCE admin_jogok_aj_id_seq OWNED BY admin_jogok.aj_id;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------
=20
The problem is here:
ERROR:  syntax

error at or near "OWNED"
=20
I checked the manual, and i think the syntax is good. If i do it with
pgadmin, then there wont be any table.
If i run it from command line, the linux box says the errors, but create the
tables, and insert the data.
=20
=20
Ferenc Vas=F3czki
=20

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Sergey Burladyan"
Дата:
Сообщение: BUG #3396: strange error report for 'create domain ... default null'
Следующее
От: "Murali Doss"
Дата:
Сообщение: BUG #3397: change the pg_setting