pg_dump issues

From: "Rod Taylor" <rod(dot)taylor(at)inquent(dot)com>
To: "Hackers List" <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump issues
Date: 2001-01-24 19:48:35
Message-ID: 05e401c0863e$a377ddd0$2205010a@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Could we add a flag to remove the postgres specific information from a
pg_dump?

--
UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" ~*
'market_type';

BEGIN TRANSACTION;

CREATE TEMP TABLE "tr" ("tmp_relname" name, "tmp_reltriggers"
smallint);

INSERT INTO "tr" SELECT C."relname", count(T."oid") FROM "pg_class" C,
"pg_trigger" T WHERE C."oid" = T."tgrelid" AND C."relname" ~*
'market_type' GROUP BY 1;

UPDATE "pg_class" SET "reltriggers" = TMP."tmp_reltriggers" FROM "tr"
TMP WHERE "pg_class"."relname" = TMP."tmp_relname";

DROP TABLE "tr";

COMMIT TRANSACTION;

--

These make importing into other database systems rather difficult.

--
Rod Taylor

There are always four sides to every story: your side, their side, the
truth, and what really happened.

Attachment Content-Type Size
Taylor, Rod B.vcf text/x-vcard 451 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2001-01-24 19:56:00 pg_dump -c database problem
Previous Message Bruce Momjian 2001-01-24 19:31:29 Re: [GENERAL] child table doesn't inherit PRIMARY KEY?