Re: pgdump

From: Andreas Tille <tillea(at)rki(dot)de>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgdump
Date: 2000-09-19 08:17:39
Message-ID: Pine.LNX.4.21.0009191014240.1778-100000@wr-linux02.rki.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 19 Sep 2000, Michael Meskes wrote:

> pga_* are not really internal tables. The internal tables are named pg_*.
> pga_* are tables created by pgaccess.
This is what I thought, but the following script:

#!/bin/sh
echo "create database test ;" | psql
pg_dump -n -c test

creates the output:

\connect - postgres
DROP TABLE pga_queries;
CREATE TABLE pga_queries (
queryname character varying(64),
querytype character,
querycommand text,
querytables text,
querylinks text,
queryresults text,
querycomments text
);
REVOKE ALL on pga_queries from PUBLIC;
GRANT ALL on pga_queries to PUBLIC;
DROP TABLE pga_forms;
CREATE TABLE pga_forms (
formname character varying(64),
formsource text
);
REVOKE ALL on pga_forms from PUBLIC;
GRANT ALL on pga_forms to PUBLIC;
DROP TABLE pga_scripts;
CREATE TABLE pga_scripts (
scriptname character varying(64),
scriptsource text
);
REVOKE ALL on pga_scripts from PUBLIC;
GRANT ALL on pga_scripts to PUBLIC;
DROP TABLE pga_reports;
CREATE TABLE pga_reports (
reportname character varying(64),
reportsource text,
reportbody text,
reportprocs text,
reportoptions text
);
REVOKE ALL on pga_reports from PUBLIC;
GRANT ALL on pga_reports to PUBLIC;
DROP TABLE pga_schema;
CREATE TABLE pga_schema (
schemaname character varying(64),
schematables text,
schemalinks text
);
REVOKE ALL on pga_schema from PUBLIC;
GRANT ALL on pga_schema to PUBLIC;
DROP FUNCTION plpgsql_call_handler ();
CREATE FUNCTION plpgsql_call_handler ( ) RETURNS opaque AS '/usr/lib/postgresql/lib/plpgsql.so' LANGUAGE 'C';
DROP PROCEDURAL LANGUAGE 'plpgsql';
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';
COPY pga_queries FROM stdin;
\.
COPY pga_forms FROM stdin;
\.
COPY pga_scripts FROM stdin;
\.
COPY pga_reports FROM stdin;
\.
COPY pga_schema FROM stdin;
\.

That's really annoying.

> > create it via "create database <name>" those tables are created
> > automatically. Restoring the old content of the database using
>
> What version are you using? On my 7.0.2 (actual Debian package, so I guess
> you are using the same) they are definitely not created autiomatically.
Hmm, yes I use also the Debian-Packages from woody.

~> dpkg --status postgresql
Package: postgresql
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 1932
Maintainer: Oliver Elphick <Oliver(dot)Elphick(at)lfix(dot)co(dot)uk>
Version: 7.0.2-4

Kind regards

Andreas.

In response to

  • Re: pgdump at 2000-09-19 17:04:15 from Michael Meskes

Browse pgsql-general by date

  From Date Subject
Next Message Marko Kreen 2000-09-19 08:24:34 Re: binary operators on integers
Previous Message Karel Zak 2000-09-19 08:11:56 Re: [HACKERS] char* to Datum conversion