From: "Vasoczki Ferenc" <vasoczki(dot)ferenc(at)sma(dot)hu>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject:
Date: 2007-06-20 12:03:41
Message-ID: 20070620120009.545C55AF881@svr4.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi!

I have several problems with pg_dump, and pg_restore, and pgadmin.

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.
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.

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

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.

I join to this opinion:

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).

Ok, no problem, i can use this dump like an sql query, so do it:

--
-- PostgreSQL database dump
--

SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';

--
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--

CREATE PROCEDURAL LANGUAGE plpgsql;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: admin_jogok; Type: TABLE; Schema: public; Owner: monarchia_uj;
Tablespace:
--

CREATE TABLE admin_jogok (
admin_id integer,
jog_id character varying(100),
aj_id integer NOT NULL,
alfuncid character varying(100)
);

ALTER TABLE public.admin_jogok OWNER TO monarchia_uj;

--
-- Name: admin_jogok_aj_id_seq; Type: SEQUENCE; Schema: public; Owner:
monarchia_uj
--

CREATE SEQUENCE admin_jogok_aj_id_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;

ALTER TABLE public.admin_jogok_aj_id_seq OWNER TO monarchia_uj;

--
-- Name: admin_jogok_aj_id_seq; Type: SEQUENCE OWNED BY; Schema: public;
Owner: monarchia_uj
--

ALTER SEQUENCE admin_jogok_aj_id_seq OWNED BY admin_jogok.aj_id;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------

The problem is here:
ERROR: syntax

error at or near "OWNED"

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.


Ferenc Vasóczki

Responses

  • Re: at 2007-06-20 14:33:32 from Stéphane Schildknecht

Browse pgsql-bugs by date

  From Date Subject
Next Message Sergey Burladyan 2007-06-20 12:06:16 BUG #3396: strange error report for 'create domain ... default null'
Previous Message nasim.sindri 2007-06-20 09:56:50 BeginTransaction failed when calling postgresql procedure with ado