Re: pgdump - Mailing list pgsql-general

From Andreas Tille
Subject Re: pgdump
Date
Msg-id Pine.LNX.4.21.0009191014240.1778-100000@wr-linux02.rki.de
Whole thread Raw
In response to Re: pgdump  (Michael Meskes <meskes@postgresql.org>)
List 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.Elphick@lfix.co.uk>
Version: 7.0.2-4

Kind regards

        Andreas.


pgsql-general by date:

Previous
From: Karel Zak
Date:
Subject: Re: [HACKERS] char* to Datum conversion
Next
From: Marko Kreen
Date:
Subject: Re: binary operators on integers