Skip to content

Instantly share code, notes, and snippets.

@erichanson
Created February 28, 2014 00:18
Show Gist options
  • Save erichanson/9262614 to your computer and use it in GitHub Desktop.
Save erichanson/9262614 to your computer and use it in GitHub Desktop.
List of relations
Schema | Name | Type | Owner
---------+----------+-------+-------
sailors | boats | table | eric
sailors | reserves | table | eric
sailors | sailors | table | eric
Table "sailors.sailors"
Column | Type | Modifiers
--------+-----------------------+-----------
sid | integer | not null
sname | character varying(20) |
rating | integer |
age | real |
Referenced by:
TABLE "reserves" CONSTRAINT "reserves_sid_fkey" FOREIGN KEY (sid) REFERENCES sailors(sid)
Table "sailors.reserves"
Column | Type | Modifiers
--------+---------+-----------
sid | integer | not null
bid | integer | not null
day | date |
Foreign-key constraints:
"reserves_bid_fkey" FOREIGN KEY (bid) REFERENCES boats(bid)
"reserves_sid_fkey" FOREIGN KEY (sid) REFERENCES sailors(sid)
Table "sailors.boats"
Column | Type | Modifiers
--------+-----------------------+-----------
bid | integer | not null
bname | character varying(20) |
color | character varying(10) |
Referenced by:
TABLE "reserves" CONSTRAINT "reserves_bid_fkey" FOREIGN KEY (bid) REFERENCES boats(bid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment