Skip site navigation (1) Skip section navigation (2)

pg_dump for domains

From: "Rod Taylor" <rbt(at)zort(dot)ca>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: pg_dump for domains
Date: 2002-03-28 00:57:19
Message-ID: 09d701c1d5f3$8365a350$8001a8c0@jester (view raw or flat)
Thread:
Lists: pgsql-patches
Adds domain dumping support to pg_dump.

Is the use of deps proper or necessary?


Tested with the below:


--
-- Selected TOC Entries:
--
\connect - rbt

--
-- TOC Entry ID 2 (OID 16582)
--
-- Name: dom1 Type: DOMAIN Owner: rbt
--

CREATE DOMAIN "dom1" AS integer NOT NULL;

--
-- TOC Entry ID 4 (OID 16583)
--
-- Name: dom2 Type: DOMAIN Owner: rbt
--

CREATE DOMAIN "dom2" AS text DEFAULT 'haha';

--
-- TOC Entry ID 5 (OID 16584)
--
-- Name: dom3 Type: DOMAIN Owner: rbt
--

CREATE DOMAIN "dom3" AS integer NOT NULL DEFAULT 4;

--
-- TOC Entry ID 6 (OID 16585)
--
-- Name: tab1 Type: TABLE Owner: rbt
--

CREATE TABLE "tab1" (
        "col1" dom1 NOT NULL,
        "col2" dom2,
        "col3" dom3 NOT NULL,
        "col4" dom1 DEFAULT 1 NOT NULL,
        "col5" dom2 DEFAULT 'different' NOT NULL
);

--
-- Data for TOC Entry ID 7 (OID 16585)
--
-- Name: tab1 Type: TABLE DATA Owner: rbt
--


COPY "tab1" FROM stdin;
1       haha    4       1       different
\.
--
-- TOC Entry ID 3 (OID 16582)
--
-- Name: DOMAIN "dom1" Type: COMMENT Owner:
--

COMMENT ON DOMAIN "dom1" IS 'HEHE';
--
Rod Taylor

Your eyes are weary from staring at the CRT. You feel sleepy. Notice
how restful it is to watch the cursor blink. Close your eyes. The
opinions stated above are yours. You cannot imagine why you ever felt
otherwise.


Attachment: pg_dump_domain.patch
Description: application/octet-stream (7.6 KB)

Responses

pgsql-patches by date

Next:From: Christopher Kings-LynneDate: 2002-03-28 01:29:27
Subject: ALT*R T*BL* S*T / DR*P N*T N*LL patch - 4th try
Previous:From: Nicolas BazinDate: 2002-03-27 22:34:53
Subject: Re: build of 7.2.1 on SCO Openserver and Unixware 7.1.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group