|
meaningful trigger descriptions: msg#00213db.postgresql.novice
When one describes a table psql lists the foreign keys after the table columns, e.g.: calendar=> \d business Table "business" Column | Type | Modifiers ------------------+-----------------------------+----------------------------------------------- id | integer | not null default nextval('business_id'::text) name | character varying(100) | not null owner | character varying(100) | not null address_line_1 | character varying(100) | not null address_line_2 | character varying(100) | city | character varying(100) | not null state_code | character(2) | not null zip | character(5) | not null zip_4 | character(4) | primary_timezone | character(3) | not null default 'GMT' create_date | timestamp(0) with time zone | default now() last_update_date | timestamp(0) with time zone | create_by | integer | last_update_by | integer | Primary key: business_pk Unique keys: business_name_key, business_name_owner Triggers: RI_ConstraintTrigger_56403390, RI_ConstraintTrigger_56403392, RI_ConstraintTrigger_56403426, RI_ConstraintTrigger_56403428, RI_ConstraintTrigger_56403514, .... Does anyone have a query handy that will print out something prettier for those foreign key constraints, like: tablename constraint ---------------------- foo FOREIGN KEY (a) REFERENCES bar foo FOREIGN KEY (b) REFERENCES goo bar q FOREIGN KEY (z) REFERENCES goo ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: MySQL comparable syntax for PostgreSQL: 00213, douggorley |
|---|---|
| Next by Date: | Re Dynamic IP - pg_hba: 00213, Dirk Hamstra |
| Previous by Thread: | Dynamic IP - pg_hbai: 00213, Dirk Hamstra |
| Next by Thread: | Re Dynamic IP - pg_hba: 00213, Dirk Hamstra |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |