improve table dumping - Mailing list pgsql-patches

From Christopher Kings-Lynne
Subject improve table dumping
Date
Msg-id 079f01c2deff$3eb9dcb0$6500a8c0@fhp.internal
Whole thread Raw
List pgsql-patches
Hi,

This implements a new layout for psql's \d command and actually shows rule
definitions as well as names:

Indexes:
    "users_users_pkey" PRIMARY KEY btree (userid),
    "users_users_username_key" UNIQUE btree (username),
    "users_users_email_lower_idx" btree (lower(email)),
Foreign Key Constraints:
    "$1" FOREIGN KEY (referrer) REFERENCES users_users(userid) ON UPDATE NO
ACTION ON DELETE SET NULL
Rules:
    "test_rule" AS ON INSERT TO users_users DO INSTEAD NOTHING;
Triggers:
    "RI_ConstraintTrigger_1105134",
    "RI_ConstraintTrigger_1105135",
    "RI_ConstraintTrigger_1105138",
    "RI_ConstraintTrigger_1105139",
    "RI_ConstraintTrigger_1105396",
    "RI_ConstraintTrigger_1105397"

I think it's an improvement - it make a lot more stuff just fit on the
screen, and is a lot easier to read!  I did also notice that pg_get_ruledef
appends a semicolon, whereas the other pg_get_* functions do not...

Chris

Attachment

pgsql-patches by date:

Previous
From: Rod Taylor
Date:
Subject: psql re-work
Next
From: greg@turnstep.com
Date:
Subject: Re: XML ouput for psql