New format for psql (repost)

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: New format for psql (repost)
Date: 2003-02-28 05:25:45
Message-ID: 06fe01c2dee9$d86c7d10$6500a8c0@fhp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(This didnt' seem to get through :( )

Hi,

I have done up a new way of dumping table data:

Indexes:
"users_users_pkey" PRIMARY KEY btree (userid),
"users_users_username_key" UNIQUE btree (username),
"expiry_users_users_key" btree (expiry),
"users_users_email_lower_idx" btree (lower(email)),
"users_users_referrer_idx" btree (referrer),
"users_users_susp_off_idx" btree (suspended_off) WHERE (suspended_off IS
NOT NULL)
Check Constraints:
"users_users_sex" CHECK ((sex = 'M'::bpchar) OR (sex = 'F'::bpchar))
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;,
"test_rule2" 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 this is a massive improvement, and far more readable, compared to
this:

Indexes: users_users_pkey primary key btree (userid),
users_users_username_key unique btree (username),
expiry_users_users_key btree (expiry),
users_users_email_lower_idx btree (lower(email)),
users_users_referrer_idx btree (referrer),
users_users_susp_off_idx btree (suspended_off) WHERE (suspended_off
IS NOT NULL)
Check constraints: "users_users_sex" ((sex = 'M'::bpchar) OR (sex =
'F'::bpchar))
Foreign Key constraints: $1 FOREIGN KEY (referrer) REFERENCES
users_users(userid) ON UPDATE NO ACTION ON DELETE SET NULL
Rules: test_rule,
test_rule2
Triggers: RI_ConstraintTrigger_1105134,
RI_ConstraintTrigger_1105135,
RI_ConstraintTrigger_1105138,
RI_ConstraintTrigger_1105139,
RI_ConstraintTrigger_1105396,
RI_ConstraintTrigger_1105397

Shall I go ahead and tidy it up for submission?

Chris

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2003-02-28 06:29:28 Re: Brain dump: btree collapsing
Previous Message Tom Lane 2003-02-28 04:12:21 Re: Brain dump: btree collapsing