pg_restore parameter( -n) not work

Started by Wang Haiyongalmost 20 years ago2 messagesbugs
Jump to latest
#1Wang Haiyong
wanghaiyong@neusoft.com

Hello, I run pg_restore on linux. I meet a problem. It is ...

pg_restore 8.1.0 parameter( -n) not work。

TEST CASE:

[postgres@db2 ~]$ createdb db5
CREATE DATABASE
[postgres@db2 ~]$ psql db5
Welcome to psql 8.1.0, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

db5=# create table t1(i int,j int);
CREATE TABLE
db5=# create schema work;
CREATE SCHEMA
db5=# create table work.t1(i int,j int);
CREATE TABLE
db5-# \q
[postgres@db2 ~]$ pg_dump -d db5 -Fc > a.out

Oonly a little information is displayed.
[postgres@db2 ~]$ pg_restore -n work a.out
--
-- PostgreSQL database dump
--

SET client_encoding = 'EUC_CN';
SET check_function_bodies = false;
SET client_min_messages = warning;

--
-- PostgreSQL database dump complete
--

----------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you.
-----------------------------------------------------------------------------------------------

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Wang Haiyong (#1)
Re: pg_restore parameter( -n) not work

Wang Haiyong <wanghaiyong@neusoft.com> writes:

pg_restore 8.1.0 parameter( -n) not work��

This is fixed in 8.1.4.

2006-04-12 18:19 tgl

* src/bin/pg_dump/: pg_backup_archiver.c, pg_restore.c
(REL8_1_STABLE): Fix pg_restore -n option to do what the man page
says it does. The original coding only worked if one of the
selTypes restriction options was also given. Per report from Nick
Johnson.

regards, tom lane