(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




Fri, 28 Feb 2003 13:25:45 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
New format for psql  (repost)