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